users:dagnall53:rocdisplay_howto
Differences
This shows you the differences between two versions of the page.
users:dagnall53:rocdisplay_howto [2019/05/08 19:18] – [Text Objects] dagnall53 | users:dagnall53:rocdisplay_howto [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | Index | ||
- | * [[: | ||
- | * [[: | ||
- | * [[: | ||
- | | ||
- | ====== How to send messages to WiRocS OLEDS ====== | ||
- | |||
- | This page will explain how to get simple messages displayed on WiRocS with Standard I2C OLED displays. | ||
- | |||
- | {{: | ||
- | |||
- | In this space I will not try to explain Scheduling, or the (super!) XML to generate automatic messages from the Schedules, to understand these, please follow the Forum discussions. | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | **But** I will try to show how to put **simple** messages onto the displays. | ||
- | This should allow display of " | ||
- | |||
- | ====== Text Objects ====== | ||
- | |||
- | |||
- | The RocDisplay system is based on RocRail " | ||
- | Each Text object has an Interface setting that defines where the message will be sent. Their Interface settings are as follows: | ||
- | * **Interface ID** (Your RocNet ID name- I use ' | ||
- | * **Bus** (eg:50) The Rocnet node address of the WiRocS node with the OLEDS) | ||
- | * My WiRocS node defaults to 50 so I have used this in the examples. | ||
- | * **Address** (eg:60) Can be 60 or 61. | ||
- | * **Display** (eg:1) /// | ||
- | * I will call this example in later descriptions (50,60,1) | ||
- | \\ | ||
- | Do not worry at this stage about putting any text in the " | ||
- | \\ | ||
- | The WiRocS node has two I2C busses, each can support have OLEDS with physical addresses 60 or 61. \\ | ||
- | |||
- | So, for OLED with Physical address 60 on the primary I2C bus, the code automatically organises the RocDisplay messages on the OLED screen in vertical order like this: | ||
- | * --RocDisplay " | ||
- | * --RocDisplay " | ||
- | * --RocDisplay " | ||
- | * --RocDisplay " | ||
- | * --RocDisplay " | ||
- | * --RocDisplay " | ||
- | * --RocDisplay " | ||
- | * --RocDisplay " | ||
- | |||
- | If you are using a 32 pixel high OLED, it will organise the display like this: | ||
- | * --RocDisplay " | ||
- | * --RocDisplay " | ||
- | * --RocDisplay " | ||
- | * --RocDisplay " | ||
- | |||
- | Address " | ||
- | OLEDS with the Physical Address 61 on the primary I2C bus show display messages numbered 1-4 eg: | ||
- | Messages for Physical Address 61 on the secondary I2C bus show display messages numbered 5-8 eg: | ||
- | |||
- | For best effects, you will need to send some Formatting commands in your message to make them produce nice looking displays. | ||
- | |||
- | See also [[users: | ||
- | |||
- | |||
- | |||
- | ====== Actions ====== | ||
- | |||
- | {{: | ||
- | To use pushbuttons on RocView to send messages, this you must first create some ACTIONS. I have generated quite a few whilst programming and testing the code. A typical action example is this example "1 RocDisplay1" | ||
- | You need to set the " | ||
- | \\ | ||
- | \\ | ||
- | \\ | ||
- | \\ | ||
- | Now add a button to your RocView, {{: | ||
- | |||
- | Its as simple as that. Now, when you press the button, RocRail will send the message we defined in the Action "1 RocDisplay1" | ||
- | |||
- | |||
- | |||
- | ---- | ||
- | |||
- | |||
- | ===== 128*64 Displays and 128*32 Displays | ||
- | |||
- | ==== Original RocDisplay (128*16) ==== | ||
- | |||
- | This code tries to keep RocDisplay compatible formatting\\ | ||
- | The original RocRisplay was based on 128*16 OLEDS, and so each Text Object was able to send text to TWO lines of these small OLEDS. | ||
- | * Each RocDisplay "text object" | ||
- | * In the original Rocdisplay system each text object only sent to ONE OLED. | ||
- | * Text object message lengths are limited to ~100 characters | ||
- | |||
- | |||
- | ==== WiRocS ==== | ||
- | |||
- | In WiRocS version of the system: | ||
- | * My OLEdS are four times larger than the original " | ||
- | * WiRocS support two 128*64 OLEDS with Physical I2C addresses 60 and 61 on each I2C bus. | ||
- | * WiRocS has two I2C busses. | ||
- | * OLEDS found on the Primary bus are named OLED1(' | ||
- | * OLEDS found on the Secondary bus are named OLED2(' | ||
- | * To retain backwards compatibility, | ||
- | * (OLED1) will show messages from (RN,60,1-4) and OLED3 will show messages from (RN,60,5-8) (Primary I2C bus) | ||
- | * (OLED2) will show messages from (RN,60,1-4) and OLED4 will show messages from (RN,60,5-8) (Secondary I2C bus) | ||
- | |||
- | ==== 128*32 ==== | ||
- | |||
- | The WiRocS can also be used with smaller 128*32 displays. | ||
- | * 128*32 displays are NOT available with selectable I2C addresses, so only two can be used with WiRocS.\\ | ||
- | * An EEPROM Saved " | ||
- | * If " | ||
- | * If " | ||
- | * Text objects (50,60,1) & (50,60,2) will shown on " | ||
- | * Text objects (50,60,3) & (50,60,4) will shown on " | ||
- | * During power up a debug message appears on the OLEDs to identify what text objects can be shown. | ||
- | * (Note that internally the code has to set up the 128*32 versions of the OLED1/2 code as " | ||
- | * Any changes to " | ||
- | | ||
- | |||
- | ---- | ||
- | ==== Where will Text Objects show on the WiRocS OLED? ==== | ||
- | |||
- | RocDisplay Text Objects display on " | ||
- | |||
- | A 128*64 OLED1 with I2C Address 60 on the Main I2C bus of Rocnode has 8 physical lines of text.\\ | ||
- | Each display can therefore display 4 pairs of RocDisplay/' | ||
- | Text for the top two lines are sent using "text object" | ||
- | Text for the next two lines are sent using text object (50,60,2), etc.\\ | ||
- | Allowing direct writing to all 8 line pairs, and retaining compatibility with existing Rocdisplay systems.\\ | ||
- | |||
- | Assuming the following (formatted) text examples | ||
- | * Text on text object (50,60,1) is " | ||
- | * Text on text object (50,60,2) is " | ||
- | * etc.. | ||
- | |||
- | The OLED will show something like this: | ||
- | |||
- | Text_Object" | ||
- | Text_Object" | ||
- | Text_Object" | ||
- | Text_Object" | ||
- | Text_Object" | ||
- | Text_Object" | ||
- | Text_Object" | ||
- | Text_Object" | ||
- | | ||
- | When you send short, " | ||
- | |||
- | Text_Object " | ||
- | (space) | ||
- | Text_Object " | ||
- | (space) | ||
- | Text_Object " | ||
- | (space) | ||
- | Text_Object " | ||
- | (space) | ||
- | |||
- | |||
- | |||
- | ---- | ||
- | |||
- | ==== Text Wrapping ==== | ||
- | |||
- | {{: | ||
- | \\ | ||
- | \\ | ||
- | \\ | ||
- | \\ | ||
- | \\ | ||
- | \\ | ||
- | \\ | ||
- | |||
- | |||
- | {{: | ||
- | \\ | ||
- | \\ | ||
- | \\ | ||
- | \\ | ||
- | RocDisplay formatted messages are NOT allowed to Wrap. It is assumed that they will be properly sized to show on the display. IF a very long RocDisplay formatted message //is// sent, the end of the message can reappear on the left of the display and overwrite any text on the left. This will produce a mess on the screen. The answer to this is to keep RocDisplay messages short! | ||
- | |||
- | |||
- | | ||
- | |||
- | |||
- | | ||
- | |||
- | |||
- | |||
- | | ||