Day 7: Analogue write
Behind today’s door is a potentiometer. You can use it to transfer analogue messages to the Blynk app. To do this, you need to build the circuit according to the picture.
Things can get a bit tight when constructing with the MicroUSB cable. So that everything connects, you first have to disconnect the board from the cable and place the jumpers to be as flat as possible. You also need to be aware that this time the VCC is not applied to the track at the bottom of the image; instead, the track is intended for the connection at Pin A0.
You can import the Blynk interface as usual with the QR code. You’ll find the programme above. Don’t forget to enter the new token and your WLAN data before you upload the programme to the NanoESP board.
The measured data are now received approx. once a second and shown in the graph widget. You can affect the measured values by turning the potentiometer. Note that the maximum value is 1023. The reason is that the NanoESP reads the voltage with a resolution of 10 bits. These are formed from a voltage range between 0 and +5 V. The potentiometer acts as a voltage divider in this process, so that voltages between 0 and 5 V can be adjusted at the centre pin.