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) Oled with a I2C display is connected to the WiRocS node. When the nodes start they now scan to see if any OLED displays are present (Addresses 60 and 61)
IF OLEDs are found seen, the code can display messages and clocks on the display.
If there are no OLEDS present, the ESP8266 version of the code releases these two pins "back" for general purpose I/O use.
The ESP32 version uses extra pins so none are "lost"
From WiRocSV12, the code has an additional "secondary" I2C defined, so that two displays with address 60 can be used together. This allows use of the smaller 128*32 displays, which do not have the ability to change addresses to 61.

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

On the ESP8266 version, the main I2C bus uses D3 and D4, which (when the board is on the Motor shield) are the Motor direction pins. Pins D1 and D2 remain connected to the Motor Shield PWM drives, so the Motor Shield outputs can be used as dimmable filament light drives (because the "direction" does not matter to a filament light).
The ESP32 version uses two separate pins to the general purpose I/O set.
The Secondary I2C bus is set to D1 and D2 on the esp8266, and pins 19 and 21 on the ESP32. If no Oled is found on these pins, the pins should be returned for general purpose use after start-up.

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 Lite documents how the parsing in this "Lite version" of the protocol works and go into more detail about the displays.

users/dagnall53/oled.1552586262.txt.gz · Last modified: 2019/03/14 18:57 by dagnall53