Lesson 3 Wireless Light Controller - Water-Monitor/IoT-Portfolio-FJS Wiki

Wireless light controller via 2 different buttons


There was an example code for the button that we could use. At first we did not know on which pin the button was wired. The teacher explained that you can see the wire when you look carefully. There was also a code to make a HTTPClient to do the HTTP GET request. We combined both examples to make the button fully operational.


We had to wire the light with a resister of 220 ohm (320 ohm is also possible), this reduces the voltage so the light does not burnout.

Wireless light controller

When the button (httpclient) and the light (httpserver) both worked, we could integrate them with eachother. setup Afterwards we extended it with two buttons and a light and had to manually wire it instead of using the buildin-components. picture




I had to set up Arduino preferences and the ESP8266 settings again. I still do not know why. Johanna at first struggled and did not understand how the pinModes worked, so I explained that to her, that she has to be aware of that.

I searched first to set up a HTTPClient, but I did it not entirely right. After the teacher told me there was an example I had it working in no time. Combining the button and the httpclient was very easy.

When I was programming I found out that copying does not work so nice in ArduinoC, it does not easily copy the word, but it looks for copying at character level. I already hated the error tool and the fact you cannot debug so you have to write the logging yourself. The other thing I found out is that you cannot easily program two EPS8266 at the same time. Everytime you change the port of ArduinoC it changes it for all programming files that you have opened, so before uploading you constantly have to check to which one you are uploading. It slows you really down.