The Arduino's Wemos Websocket project, by Clever Cloud.
The Wemos is connected to a LED strip. This strip is a gradient defined by two colors. When a new color is selected, the gradient goes from the new color to the old one.
You can change the color of the strip thanks to the interface given by the wemos-ws-led-backend project.
The websocket client waits for a string that defines the color (format: RRRGGGBBB).
🚨 If the first LED flashes red, the connection is closed. Verify your network configuration and restart the Wemos.
Connect the LED strip to the Wemos using the small cables:
- Connect the red cable of the LED strip to the +5V of the Wemos
- Connect the white cable of the LED strip to the GND (ground) of the Wemos
- Connect the green cable of the LED strip to the D4 of the Wemos
Here is how it should look like: howitshouldlooklike.jpg
Now, plug the Wemos into your computer.
On Linux, it should work out of the box.
For Windows and Mac OS, you need to dowload a driver: https://wiki.wemos.cc/downloads
For Mac OS, here is a detailed article on how to get started with Wemos: https://blog.rjdlee.com/getting-started-with-wemos-d1-on-mac-osx/
Install the Arduino IDE: https://www.arduino.cc/en/Main/Software
In order to interact with the Wemos, you have to configure the Arduino IDE. If you can't find the WeMos D1 R2 & mini
board in Tools > Board
, do the following:
- Open preferences
File > Preferences
. - Add the line "
http://arduino.esp8266.com/stable/package_esp8266com_index.json
" in theAdditional Boards Manager URLs
field and closePreferences
. - Open
Tools > Board > Boards Manager
and searchESP8266
. - Install the
ESP8266 by ESP8266 community
. - Choose the
WeMos D1 R2 & mini
inTools > Board
.
You also have to clone the two git repositories specified at the top of the file https://github.com/CleverCloud/wemos-ws-led/blob/master/clevercloud-wemos-ws-led.ino into the libraries
folder. (open File > Preferences
and look at the Sketchbook location to find the libraries
path).
You should also clone this repository under the path where your Arduino IDE is installed
- Select the right USB port in
Tools > Port
. - Change the SSID, wifi password and the hostname (your_app_id.cleverapps.io).
- Click on the
Verify
button. - If there is no error,
Upload
it to the Wemos.