User Tools

Site Tools


users:dagnall53:oled

This is an old revision of the document!


Index

OLED display

The new WiRocS code has integrated OLED (I2C) capability that is largely compatible with the RocDisplay formatting.

To use the feature, a "standard" 0.96" 128*64 (or 128*32) 4 pin I2C OLED display is connected to the WiRocS node.
When the node starts it scans its I2C bus(s) to see if any OLED displays are present (it expects Addresses 60d and/or 61d)
IF OLEDs are found, the code will display messages and clocks on the display(s).
If there are no OLEDS present, the I2C bus pins are released back so they can be used general purpose I/O use.

See Hardware description


On the ESP8266 version, I prefer to use the board with the NodeMCU Motor Shield, as it provides easy pin locations for the servos. The "primary" I2C bus uses uses D3 and D4, which (when the board is on the Motor shield) are the 'Motor direction' pins. Pins D1 and D2 are used for the "Secondary" I2C bus, and remain connected to the 'Motor PWM' pins. This means that if any the "primary" I2C bus is used, the Motor Shield outputs can still be used as dimmable filament light drives (because the "direction" (being changed all the time as these pins are the OLED data) does not matter to a filament light!). (Note: The picture shows the OLED connected to the Secondary bus, using D1 and D2)

To allow a further two OLEDS to be used, Pins D1 and D2 can be used as a "Secondary" I2C bus. If Oleds are present on this bus, then obviously the pins cannot be used for other purposes.

The ESP32 version uses extra pins for the Main I2C bus so none are "lost" if only one I2C bus is needed.

When no Roc-Display Messages are sent to the display, it defaults to show the Rocrail Power Status, RocRail Time, and WiFi Signal Strength.

Information messages and RocDisplay Compatibility

The OLED will display messages to show how the node is progressing during boot. This can be helpful in diagnosing any issues. The code includes a simplified text parser that can accept RocDisplay messages and display them as a station announcements. A separate page Roc Display Compatible Hardware documents how the parsing in this "Lite version" of the protocol works and goes into more detail about the displays.

Please also read Selecting OLED Types

users/dagnall53/oled.1558368693.txt.gz · Last modified: 2019/05/20 18:11 by dagnall53