The OLED shield
This shield features a 64x48 pixel OLED display. We would normally not connect it as IoT sensor but it comes it handy to display the state of out WeMos sensor node, especially when running from battery and without a serial connector to the PC.
Programming the shield
The shield uses an
SSD1306 OLED dot matrix controller which is accessed through the I2C bus. In order to see if we can access the chip we can first run a little program scanning the I2C bus and showing all uses I2C addresses:
This shows us that the module must be accesses on I2C address 0x3c. The code of the i2c scanner can be found here:
https://github.com/uraich/MicroPython_IoTDemos/blob/master/drivers/i2c/i2cScan.py
The Cayenne client may use the OLED display. It first checks if it is connected and if yes it print information about the network state. This is particularly useful if the WeMos D1 mini runs on battery and there is no connection to the PC where state information can be displayed.
--
Uli Raich - 2019-03-22
Comments