10011: Draw Element
Draw an element
Payload
| Field | Name | Description | Type | Unit |
|---|---|---|---|---|
| 3 | Page ID | The page to draw or update. Page ids 0-10 are reserved for system use. If no page id is provided, page id 11 will be assumed. | uint8 | |
| 5 | Status bar Enable | Show the status bar | bool | |
| 6 | Redraw Type | Possible values:
| uint8 | |
| 7 | X | X coordinate for the start of the element. If padded, this is the start of the padded area. | uint | |
| 8 | Y | Y coordinate for the start of the element. If padded, this is the start of the padded area. | uint | |
| 9 | Width | Width of the element. If padded this does not include the padding. | uint | |
| 10 | Height | Height of the element. If padded this does not include the padding. | uint | |
| 11 | Type | Type of element to draw Possible values:
| uint8 | |
| 12 | Style | Style of the element to draw. Default is BlackOnClear. Possible values:
| uint8 | |
| 13 | FontSize | Size of the font to use. Default is Medium. Possible values:
| uint8 | |
| 14 | TextAlign | Alignment of the text. Default is Middle. Possible values:
| uint8 | |
| 15 | LineWidth | Default is 1. Max is 8. | uint8 | |
| 16 | Padding | Padding inside the element (in terms of x and y). Default is 0. | uint8 | |
| 17 | Radius | For use with circle, or corner rounding. Default is 0. | uint8 | |
| 18 | LineType | Default is Solid. Possible values:
| uint8 | |
| 19 | X2 | Second X coordinate, primarily for lines. Min 0, Max WIDTH -1. | uint | |
| 20 | Y2 | Second Y coordinate, primarily for lines. Min 0, Max HEIGHT -1. | uint | |
| 25 | Bitmap | bytes | ||
| 100 | Text | ascii |
Element types
Box
Box with text

Line

Circle

Bitmap

Examples
Draw circle in the middle of a page
Protocol
3
3
Length
350
35 bytes
Type
2739
10011 (Draw Element)
Header Count
10
1
Header Types
1
1
Message ID
41000
1
Payload Count
60
6
Payload Types
57891011
5, 7, 8, 9, 10, 11
Status bar Enable
10
false
X
1115
115
Y
151
51
Width
120
20
Height
120
20
Type
11
1 (Circle)
Checksum
18150
12981
📡 Real example from RH2 ESP32 Toit on 2025-10-17Generated using a Toit example on an RH2 ESP32
Draw a horizontal line across the middle of the page
Protocol
3
3
Length
350
35 bytes
Type
2739
10011 (Draw Element)
Header Count
10
1
Header Types
1
1
Message ID
41000
1
Payload Count
60
6
Payload Types
578111920
5, 7, 8, 11, 19, 20
Status bar Enable
10
false
X
10
0
Y
161
61
Type
12
2 (Line)
X2
1249
249
Y2
161
61
Checksum
0150
38400
📡 Real example from RH2 ESP32 Toit on 2025-10-17Generated using a Toit example on an RH2 ESP32
Draw a 40x40 lightbug logo in the top left of the screen
Protocol
3
3
Length
2370
237 bytes
Type
2739
10011 (Draw Element)
Header Count
10
1
Header Types
1
1
Message ID
41000
1
Payload Count
70
7
Payload Types
5789101125
5, 7, 8, 9, 10, 11, 25
Status bar Enable
10
false
X
10
0
Y
10
0
Width
140
40
Height
140
40
Type
13
3 (Bitmap)
Bitmap
2000000032552552551921525525525524031255255255248632552552552521272552552552521272552552552541272552552552541272552552552541272550255254127252063254127252063254127255231
0,0,0,0,0,3,255,255,255,192,15,255,255,255,240,31,255,255,255,248,63,255,255,255,252,127,255,255,255,252,127,255,255,255,254,127,255,255,255,254,127,255,255,255,254,127,255,0,255,254,127,252,0,63,254,127,252,0,63,254,127,255,231,255,254,127,255,255,255,254,127,252,24,63,254,127,252,24,63,254,127,252,24,63,254,127,252,24,63,254,127,252,24,63,254,127,252,24,63,254,127,252,24,63,254,127,252,24,63,254,127,252,24,63,254,127,252,24,63,254,127,252,24,63,254,127,252,24,63,254,127,252,24,63,254,127,252,24,63,254,127,252,24,63,254,127,252,24,63,254,127,252,24,63,254,127,255,255,255,254,127,255,255,255,254,127,255,255,255,254,63,255,255,255,252,63,255,255,255,252,31,255,255,255,248,15,255,255,255,240,3,255,255,255,192,0,0,0,0,0
Checksum
120140
35960
📡 Real example from RH2 ESP32 Toit on 2025-10-17Generated using a Toit example on an RH2 ESP32
Write the string "Lightbug..." in the top left of the screen in a box
Protocol
3
3
Length
450
45 bytes
Type
2739
10011 (Draw Element)
Header Count
10
1
Header Types
1
1
Message ID
41000
1
Payload Count
60
6
Payload Types
357811100
3, 5, 7, 8, 11, 100
Page ID
1129
129
Status bar Enable
10
false
X
10
0
Y
10
0
Type
10
0 (Box)
Text
117610510310411698117103464646
Lightbug...
Checksum
8249
12626
📡 Real example from RH2 ESP32 Toit on 2025-10-17Generated using a Toit example on an RH2 ESP32
Code
For convenience, the following constants can be used to reference this message type.