---+ The !WeMos D1 mini and its sensor and actuator shields ---++ Introduction 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 The processor board uses an Espressif ESP8266 processor chip and 4 MBytes of flash are installed on the board. <img alt="wemosd1mini.png" src="%ATTACHURL%/wemosd1mini.png" title="wemosd1mini.png" /> 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. <img alt="d1MiniPinout.png" src="%ATTACHURL%/d1MiniPinout.png" title="d1MiniPinout.png" /> 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: * You can pre-compile your programs to byte code, which takes less space in RAM * You can code freeze driver libraries, which means you integrate their byte code into The micro Python image. This however means that you must compile your own version of micro Python and flash it into the !WeMos D1 CPU. A big number of sensor and actuator boards are available. You will find a complete list with their description at https://wiki.wemos.cc/products:d1_mini_shields Here are the sensor shields and their test programs for the workshop: * The [[triple base and prototype boards]] * A simple [[Pushbutton Switch]] * [[The WS2812B rgb LED]] * The DS1307 [[real time clock]] and data logger * The [[buzzer shield]] * The [[bmp180 shield]] featuring an atmospheric pressure and a temperature sensor * The [[Oled shield]] * The [[DS18B20 shield]] with a Dallas [[https://cdn.sparkfun.com/datasheets/Sensors/Temp/DS18B20.pdf][DS18B20 ]]1-wire digital temperature sensor * The [[LED matrix shield]] * The [[SHT-30 shield]] with a SHT-30 !I2C digital temperature and humidity sensor * The [[DHT11 shield]] with a DHT11 digital temperature and humidity sensor. This device uses its own private serial communication protocol Here is an overview table showing the devices and the | *Module* | *Connections* | *Functionality* | | 1 button shield | D3: GPIO 0 | on / off push button | | !WS2812B RGB shield | D2: GPIO 4 | addressable rgb LED | | <br />DS1307 RTC and data logger | <p>D1: GPIO 5 !I2C SCL<br />D2: GPIO 4 !I2C SDA</p> <p>D5: GPIO 14 SPI Clock<br />D6: GPIO 12 SPI MOSI<br />D7: GPIO 13 SPI MISO<br />D8: GPIO 15 SPI CS</p> | <p>Real Time Clock</p> <p> </p> <p>SD card interface</p> <p> </p> | | Buzzer shield | D5 (default GPIO 14<br />D6 GPIO 12<br />D7 GPIO 13<br />D8 GPIO 15 | passive buzzer | | BMP180 shield | D1 GPIO 5 !I2C SCL<br />D2 GPIO 4 !I2C SDA | !I2C barometric pressure sensor and<br />temperature sensor | | DHT11 shield | D4 GPIO 2 | temperature and humidity sensor | | OLED shield | D1 GPIO 5 !I2C SLC<br />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<br />D2 GPIO 4 !I2C SDA | !I2C temperature and humidity sensor | | LED Matrix shield | D5 GPIO 14 CLK<br />D7 GPIO 13 Din | 8x8 LED Matrix | ir connections: For each of the devices I create 2 directories: * a <i>driver </i>directory containing programs testing the module without Cayenne communication * a _cayenne_ directory for the final program You can find the code written for the workshop on github: [[https://github.com/uraich/MicroPython_IoTDemos][https://github.com/uraich/MicroPython_IoTDemos. ]] ---++ Comments %COMMENT%
Attachments
Attachments
Topic attachments
I
Attachment
History
Action
Size
Date
Who
Comment
png
d1MiniPinout.png
r1
manage
542.9 K
2019-03-20 - 09:27
UliRaich
png
wemosd1mini.png
r1
manage
313.5 K
2019-03-20 - 09:20
UliRaich
This topic: AFNOG
>
WebHome
>
AFNOGWorkshop2019
>
WeMosD1Mini
Topic revision: r6 - 2019-05-01 - UliRaich
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback