Set the cursor col/row pixel position. The top-left position is: 0,0.
Note:there are 2 types of cursor positions, one is character position, which based on current size of font, other one is pixel position, which calculated pixel to pixel.
When setting the character position, the display convert the value to pixel position internal.
|
Direct: |
"GPxy" |
|
Arduino: |
void moveTo(unsigned int x, unsigned int y) |
|
C: |
void Digole_moveTo(unsigned int x, unsigned int y) |
x, y
The position of characters of pix, could be 1 Byte or 2 Bytes of data, depends on the value.
NOTE: if the value of x or y greater than "254", then use 2 bytes format: the first byte is fix of 255, then the second byte is the value minus 255. eg.300=255+45, so, "\xFF\x2D" is the result.
This schedule is in order to compatible small displays, which the width and height is less than 255 pixels
Warning:The 4.3" IPS modules are always use 2 bytes regular integrate format.
none
Example (Arduino):
mydisp.moveTo(150,300); //set cursor position to pixel(150,300)
//for 4.3" IPS modules
#define _Screen_Over_511_
mydisp.moveTo(150,300); //set cursor position to pixel(150,300)
serial.writeString("GP\x96\xFF\x2D"); //set cursor position to pixel(150,300)
//for 4.3" IPS modules, use uint16_t type
serial.writeString("GP\00\x96\x01\x2C"); //set cursor position to pixel(150,300)
| Version | Description |
|---|---|