Tags:
create new tag
view all tags

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.

wemosOled.png

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:

i2cscan.png

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.

oled.png

-- Uli Raich - 2019-03-22

Comments

Topic attachments
I Attachment History Action Size Date Who Comment
Texttxt i2cScan.py.txt r1 manage 0.8 K 2019-03-23 - 13:06 UliRaich  
PNGpng i2cscan.png r1 manage 28.4 K 2019-03-23 - 13:04 UliRaich  
PNGpng oled.png r1 manage 334.3 K 2019-05-17 - 16:07 UliRaich  
PNGpng wemosOled.png r1 manage 305.4 K 2019-03-22 - 14:21 UliRaich  
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2019-05-17 - UliRaich
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 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