This is the description of the TCP/IP protocol for the OLED 128x64 Bricklet. General information and technical specifications for the OLED 128x64 Bricklet are summarized in its hardware description.
A general description of the TCP/IP protocol structure can be found here.
BrickletOLED128x64.
write
¶Function ID: |
|
---|---|
Request: |
|
Response: |
|
Appends 64 byte of data to the window as set by new_window
.
Each row has a height of 8 pixels which corresponds to one byte of data.
Example: if you call new_window
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.
BrickletOLED128x64.
new_window
¶Function ID: |
|
---|---|
Request: |
|
Response: |
|
Sets the window in which you can write with write
. One row
has a height of 8 pixels.
BrickletOLED128x64.
clear_display
¶Function ID: |
|
---|---|
Request: |
|
Response: |
|
Clears the current content of the window as set by new_window
.
BrickletOLED128x64.
write_line
¶Function ID: |
|
---|---|
Request: |
|
Response: |
|
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.
BrickletOLED128x64.
set_display_configuration
¶Function ID: |
|
---|---|
Request: |
|
Response: |
|
Sets the configuration of the display.
You can set a contrast value from 0 to 255 and you can invert the color (black/white) of the display.
BrickletOLED128x64.
get_display_configuration
¶Function ID: |
|
---|---|
Request: |
|
Response: |
|
Returns the configuration as set by set_display_configuration
.
BrickletOLED128x64.
get_identity
¶Function ID: |
|
---|---|
Request: |
|
Response: |
|
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.