Warning
The openHAB bindings are still in beta, but the development was stopped.
This is the description of the openHAB API bindings for the OLED 128x64 Bricklet. General information and technical specifications for the OLED 128x64 Bricklet are summarized in its hardware description.
An installation guide for the openHAB API bindings is part of their general description.
UID:
- tinkerforge:brickletoled128x64:[UID]
Required firmware version:
- 2.0.0
Firmware update supported:
- yes
Channels: Actions: Parameters:
- Contrast – Type: integer, Default: 143, Min: 0, Max: 255
- Sets the contrast of the display (0-255).
- Invert – Type: boolean, Default: false
- Inverts the color (black/white) of the display.
Text
¶Text to display on the LCD. Command format is [line],[position],[text].
Additional ',' are handled as part of the text. Unicode characters are converted to the LCD character set if possible. Additionally you can use \x[two hex digits] to use a character of the LCD character set directly.
Type:
- String
UID:
- tinkerforge:brickletoled128x64:[UID]:BrickletOLED128x64Text
Read only:
- No
Clear Display
¶Deletes all characters from the display.
Type:
- Commands (String)
UID:
- tinkerforge:brickletoled128x64:[UID]:BrickletOLED128x64ClearDisplay
Read only:
- No
Commands:
- Accepts any string
Actions can be used in rules by creating an action object. All actions return a Map<String, Object>. Returned values can be accessed by name, sometimes the type deduction needs some hints, as shown below:
val actions = getActions("tinkerforge", "tinkerforge:brickletoled128x64:[UID]")
val hwVersion = actions.brickletOLED128x64GetIdentity().get("hardwareVersion") as short[]
logInfo("Example", "Hardware version: " + hwVersion.get(0) + "." + hwVersion.get(1) + "." + hwVersion.get(2))
brickletOLED128x64Write
(short[] data)¶Parameters: |
|
---|
Appends 64 byte of data to the window as set by NewWindow()
.
Each row has a height of 8 pixels which corresponds to one byte of data.
Example: if you call NewWindow()
with column from 0 to 127 and row
from 0 to 7 (the whole display) each call of Write()
(red arrow) will
write half of a row.
The LSB (D0) of each data byte is at the top and the MSB (D7) is at the bottom of the row.
The next call of Write()
will write the second half of the row
and the next two the second row and so on. To fill the whole display
you need to call Write()
16 times.
brickletOLED128x64NewWindow
(short columnFrom, short columnTo, short rowFrom, short rowTo)¶Parameters: |
|
---|
Sets the window in which you can write with Write()
. One row
has a height of 8 pixels.
brickletOLED128x64ClearDisplay
()¶Clears the current content of the window as set by NewWindow()
.
brickletOLED128x64WriteLine
(short line, short position, String text)¶Parameters: |
|
---|
Writes text to a specific line with a specific position. The text can have a maximum of 26 characters.
For example: (1, 10, "Hello") will write Hello in the middle of the second line of the display.
You can draw to the display with Write()
and then add text to it
afterwards.
The display uses a special 5x7 pixel charset. You can view the characters of the charset in Brick Viewer.
The font conforms to code page 437.
brickletOLED128x64GetDisplayConfiguration
()¶Return Map: |
|
---|
Returns the configuration as set by the thing configuration.
brickletOLED128x64GetIdentity
()¶Return Map: |
|
---|
Returns the UID, the UID where the Bricklet is connected to, the position, the hardware and firmware version as well as the device identifier.
The position can be 'a', 'b', 'c', 'd', 'e', 'f', 'g' or 'h' (Bricklet Port). A Bricklet connected to an Isolator Bricklet is always at position 'z'.
The device identifier numbers can be found here.