Today’s project is about controlling the RGB-LED by web server. A well-structured interface can be used to change the colour of the LED. The website has also been adjusted and should be easy to display even on Smartphones.

Die Webseite mit ColorPicker
The website on a PC browser

Behind today’s advent calendar door, there is another resistor, but this one is of 10 kΩ (brown, black, orange). You will need it for tomorrow’s experiment.

Anschluss der RGB LED an die Pins D3, D5 und D6
The circuit of todays project

The structure of today’s experiment is like the one from day ten. The RGB-LED is connected to the PWM-capable pins D3, D5 and D6 with dropping resistors.

The program: Day14_TCPServerRGB

The transmitted website is again concealed in the Progmem variables site in binary form. Again, you can view the HTML page in the Sketch folder. After setting the WLAN data and uploading the programme, the website of the web server can be reached via the IP of the module. The page is designed similarly to the previous one in background colour and headline. However, there is a new element on the page, i.e. the HTML5element Colour Picker. It can be used to select a colour for the LED. Once you have confirmed the colour, the LED will display it. The display of the Colour-Picker element may differ strongly depending on the chosen browser.

Das ColorPicker Element im Android 5.0 Browser
The ColorPicker element in an Android 5.0 browser