I designed WeatherBot to be a fun robot that can show a tempareture reading in an innovate and unusual way; it uses a servo to point to a value on a dial, on its stomach. It even holds the temperature sensor in its hand, with the wires going to the back of the robot where the microcontroller is housed.
Weatherbot is quite a simple robot and only needs a couple of parts:
| Item | Description | Qty | Unit Price | Total |
|---|---|---|---|---|
| Temperature Sensors | DHT22 | 1 | £3.00 | £3.00 |
| Servo | SG90 | 1 | £4.00 | £4.00 |
| MicroController | ESP8266 | 1 | £4.00 | £4.00 |
| Total | £11.00 |
The MicroPython code for WeatherBot is avialable at: https://www.github.com/kevinmcaleer/nodemcu_wifi
WeatherBot is made up of two main pieces:
Copy both the umqttsimple.py and weatherbot.py to the Pico or ESP8266 microcontroller using Thonny. You can configure weatherbot to send its readings to an MQTT server by adding a wifi usernane and password, and MQTT server to the varibles:
ssid = 'insert your SSID here'
password = 'your password'
mqtt_server = 'your MQTT IP'The author marked this model as their own original creation.