Introduction: Arty IoT !?
In this instructable you're going to see a strange application to the Internet of Things (IoT): What if you could control art from the web?
Here we're going to show how to control lights using a web enabled arduino (ESP8266 "wemos") and independently addressable tri-color LEDs (WS2812). We'll focus on the Tagada (AKA iNecklace), a luminous knitted necklace made with Alice Giordani during the Schmiede residency.
Step 1: Get Your Candies
The most tasty is probably the Arduino with integrated WiFi, in this project we use the Wemos:
Quite tasty too, the LEDs can be found for cheap by looking for WS2812 on aliexpress, here is an example:
Also, we used ultra thin enameled copper wire for the connections, this one would work:
Finally, to power your system, you might want to keep it simple with this flat power bank:
Step 2: Make Flexible But Reliable Wires
To make the communication reliable, we added redundancy by doubling each wire and twisting them (see 1st picture).
Once each wire is doubled, we still need 4 wires to drive the LEDs (VCC, GND, Data in, Data out).
These 4 wires are isolated so we twisted them together with a bit of knitting thread, it's aesthetic but it also makes it more robust.
(if you don't have the machine, you can do it by hand or just get multi core wire)
Step 3: Connect the Wires
It's a long process but yes, each wire must be soldered.
To do so, the enamel can be removed using a lighter and/or scratching a bit with a cutter - more here:
Note 1: make sure to test all the connection with a continuity tester (multi-meter) before hiding the cables.
Note 2: as you can see on the 2nd picture, the junction can be strengthened using heat shrink.
Step 4: Web Interface
Before testing your LEDs, we need to setup the ESP8266 core in the Arduino environment:
- Install Arduino if you don't already have it (arduino.cc/download)
- Start it and open the Preferences window
- In the Additional Board Manager URLs field, enter: http://arduino.esp8266.com/versions/2.3.0/package_esp8266com_index.json
- Open Boards Manager from Tools -> Board menu
- Type esp and the esp8266 platform will appear, install it
This repo is the reference, you'll find a lot of magic there if you dig it.
To test the WIFI, the simplest is the creation of an access point:
- Select your ESP8266 board from Tools -> Board menu (in our case it's the Wemos D1 mini)
- Open the WiFiAccessPoint program from Examples -> ESP8266WiFi
Upload the program, you should now see your access point!
Step 5: Blink!
Now that our special Arduino is set, let's test the LEDs.
Download or clone the following repo:
Installation instructions from their readme:
- rename folder to 'Adafruit_NeoPixel' if it's differnent and install it in your Arduino Libraries folder
- Restart Arduino IDE
- then open File->Sketchbook->Library->Adafruit_NeoPixel->strandtest sketch.
Upload this test program and it should blink! (plus extra)
Step 6: Control Your LEDs From Our Web Interface!
Now that we tested the LEDs and the WiFi, we can try our web interface to control them.
Download or clone the following repository:
And install the dependencies if you miss any:
Now you should be able to upload the .ino file in your Wemos.
Follow the instruction in the Usage section:
If you're using your phone, you should have a similar interface as the attached screenshot.
Congrats, you can now control your wearable LEDS from the web !!!
The Arty IOT applications are very broad, If you want to go further, check the following air pollution monitor, made on the same principle in collaboration with George Gally:
We have a be nice policy.
Please be positive and constructive.