We have seen that the ESP01 can be programmed with micro Python and that there are add-on sensor boards available. However, when we connect the sensor board we loose the serial connection to the PC. This can be corrected by soldering extra connectors to the top of the ESP01 board but this is fiddly and needs good soldering equipment and good soldering skills. The other option is to get access to the ESP01 through WiFi using WebRepl
A better and only slightly more expensive solution (we are talking about ~ 3.5 US$ instead of 2.5 US$) is the Wemos D1 mini board. This boards gives up more I/O connections and many more sensor and actuator shields are readily available on the market.
The processor board uses an Espressif ESP8266 processor chip and 4 MBytes of flash are installed on the board.
You will find a description of the pinout at https://www.likecircuit.com/wemos-d1-mini-pinout
For convenience I copied the basic information here.
In contrast to a PC the WeMos D1 mini has only very limited memory resources. While 4 MBytes of flash memory is rather comfortable, the amount of RAM (80 K) is a very limiting factor. When running micro Python a mere 30 kBytes is left for your Python programs. There are essentially 2 ways to make most out of the small amount of RAM:
Here are the sensor shields and their test programs for the workshop:
Module | Connections | Functionality |
---|---|---|
1 button shield | D3: GPIO 0 | on / off push button |
WS2812B RGB shield | D2: GPIO 4 | addressable rgb LED |
DS1307 RTC and data logger |
D1: GPIO 5 I2C SCL D5: GPIO 14 SPI Clock |
Real Time Clock
SD card interface
|
Buzzer shield | D5 (default GPIO 14 D6 GPIO 12 D7 GPIO 13 D8 GPIO 15 |
passive buzzer |
BMP180 shield | D1 GPIO 5 I2C SCL D2 GPIO 4 I2C SDA |
I2C barometric pressure sensor and temperature sensor |
DHT11 shield | D4 GPIO 2 | temperature and humidity sensor |
OLED shield | D1 GPIO 5 I2C SLC D2 GPIO 4 I2C SDA |
64x48 pixel display with SSD1036 I2C controller |
DD18B20 shield | D2 GPIO 4 | 1-wire digital temperature sensor |
SHT30 shield | D1 GPIO 5 I2C SCL D2 GPIO 4 I2C SDA |
I2C temperature and humidity sensor |
LED Matrix shield | D5 GPIO 14 CLK D7 GPIO 13 Din |
8x8 LED Matrix |
For each of the devices I create 2 directories:
You can find the code written for the workshop on github: https://github.com/uraich/MicroPython_IoTDemos.
I | Attachment | History | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|---|
![]() |
d1MiniPinout.png | r1 | manage | 542.9 K | 2019-03-20 - 09:27 | UliRaich | |
![]() |
wemosd1mini.png | r1 | manage | 313.5 K | 2019-03-20 - 09:20 | UliRaich |