3.1. Inkplate Peripheral Mode

Peripheral mode for Inkplate by Soldered Peripheral mode is uploaded to each Inkplate. It enables you to use the board without reprogramming. You just need to send commands via UART and it will show contents on its screen. You can send commands via USB port or by directly connecting to ESP32 TX and RX pins.

Here is an example on how to use peripheral mode to drive Inkplate with a Raspberry Pi. And here is one for driving Inkplate with STM32.

Don’t forget you need to send #L(1)* after each command to show it on the display (equal to display.display()). Peripheral mode Arduino code for all inkplates can be found under examples/Diagnostics if needed to be installed again.

Settings are: 115200 baud, standard parity, ending with \n\r

3.1.1. echo: #?*

Check if the Inkplate receives commands on UART
Response: OK

3.1.2. drawPixel: #0(XXX,YYY,CC)*

XXX - X coordinate (with leading zeros)
YYY - Y coordinate (with leading zeros)
CC - Color (with leading zeros)
example:
#0(001,005,04)*

3.1.3. drawLine: #1(XXX,YYY,III,JJJ,CC)*

XXX - Start x coordinate (with leading zeros)
YYY - Start y coordinate (with leading zeros)
III - End x coordinate (with leading zeros)
JJJ - End y coordinate (with leading zeros)
CC - Color (with leading zeros)
example:
#1(001,004,010,123,01)*

3.1.4. drawFastVLine: #2(XXX,YYY,LLL,CC)*

XXX - Start x coordinate (with leading zeros)
YYY - Start y coordinate (with leading zeros)
LLL - Length of line (with leading zeros)
CC - Solor (with leading zeros)
example:
#2(142,425,040,05)*

3.1.5. drawFastHLine: #3(XXX,YYY,LLL,CC)*

XXX - Start x coordinate (with leading zeros)
YYY - Start y coordinate (with leading zeros)
LLL - Length of line (with leading zeros)
CC - Color (with leading zeros)
example:
#3(123,014,100,03)*

3.1.6. drawRect: #4(XXX,YYY,WWW,HHH,CC)*

XXX - Start x coordinate (with leading zeros)
YYY - Start y coordinate (with leading zeros)
WWW - Width of rect. (with leading zeros)
HHH - Height of rect. (with leading zeros)
CC - Color (with leading zeros)
example:
#4(123,014,050,010,01)*

3.1.7. drawCircle: #5(XXX,YYY,RRR,CC)*

XXX - Start x coordinate (with leading zeros)
YYY - Start y coordinate (with leading zeros)
RRR - Radius of circle (with leading zeros)
CC - Color (with leading zeros)
example:
#5(050,100,040,01)*

3.1.8. drawTriangle: #6(XX1,YY1,XX2,YY2,XX3,YY3,CC)*

XX1 - X coordinate of first corner (with leading zeros)
YY1 - Y coordinate of first corner (with leading zeros)
XX2 - X coordinate of second corner (with leading zeros)
YY2 - Y coordinate of second corner (with leading zeros)
XX3 - X coordinate of third corner (with leading zeros)
YY3 - Y coordinate of third corner (with leading zeros)
CC - Color (with leading zeros)
example:
#6(250,250,100,400,375,450,04)*

3.1.9. drawRoudRect: #7(XXX,YYY,WWW,HHH,RRR,CC)*

XXX - Start x coordinate (with leading zeros)
YYY - Start y coordinate (with leading zeros)
WWW - Width of rect. (with leading zeros)
HHH - Height of rect. (with leading zeros)
RRR - Radius (with leading zeros)
CC - Color (with leading zeros)
example:
#7(123,014,050,010,005,00)*

3.1.10. fillRect: #8(XXX,YYY,WWW,HHH,CC)*

XXX - Start x coordinate (with leading zeros)
YYY - Start y coordinate (with leading zeros)
WWW - Width of rect. (with leading zeros)
HHH - Height of rect. (with leading zeros)
CC - Color (with leading zeros)
example:
#8(123,014,050,010,01)*

3.1.11. fillCircle: #9(XXX,YYY,RRR,CC)*

XXX - Start x coordinate (with leading zeros)
YYY - Start y coordinate (with leading zeros)
RRR - Radius of circle (with leading zeros)
CC - Color (with leading zeros)
example:
#9(050,100,040,01)*

3.1.12. fillTriangle: #A(XX1,YY1,XX2,YY2,XX3,YY3,CC)*

XX1 - X coordinate of first corner (with leading zeros)
YY1 - Y coordinate of first corner (with leading zeros)
XX2 - X coordinate of second corner (with leading zeros)
YY2 - Y coordinate of second corner (with leading zeros)
XX3 - X coordinate of third corner (with leading zeros)
YY3 - Y coordinate of third corner (with leading zeros)
CC - Color (with leading zeros)
example:
#A(250,250,100,400,375,450,04)*

3.1.13. fillRoudRect: #B(XXX,YYY,WWW,HHH,RRR,CC)*

XXX - Start x coordinate (with leading zeros)
YYY - Start y coordinate (with leading zeros)
WWW - Width of rect. (with leading zeros)
HHH - Height of rect. (with leading zeros)
RRR - Radius (with leading zeros)
CC - Color (with leading zeros)
example:
#B(123,014,050,010,005,00)*

3.1.15. setTextSize: #D(NN)*

NNN - Text scaling (with leading zeros)
example:
#D(02)*

3.1.16. setCursor: #E(XXX,YYY)*

XXX - X position of text cursor (with leading zeros)
YYY - Y position of text cursor (with leading zeros)
example:
#E(002,010)*

3.1.17. setTextWrap: #F(T/F)*

T - True if enable text wraping
F - False if disable text wraping
example:
#F(T)* or #F(F)*

3.1.18. setRotation: #G(RRR)*

RRR - Sets rotation (0-3, where each increment rotates whole screen by 90 deg)
example:
#G(003)*

3.1.19. drawBitmap: #H(XXX,YYY,”PATH”)*

XXX - X position of bitmap on display
YYY - Y position of bitmap on display
PATH - path to bitmap image on SD card, where path should be sent as HEX Char (same as for print command). Example: /image1.bmp should be sent as 2f696d616765312e626d70
example: (2f696d616765312e626d70 means /image1.bmp)
#H(000,000,"2f696d616765312e626d70")*

| Response:
#H(1)* - Image loaded succesfully
#H(0)* - Image load failed
#H(-1)* - SD Card Init Error
Note: This will not work on Inkplate 2, because it has no SD card slot

3.1.20. setDisplayMode: #I(D)*

D - Display Mode (D = 3 -> 3 bit mode, D = 1 -> 1 bit mode)
example:
#I(3)* or #I(1)*
Note: This will not work on Inkplate 2, because it doesnt’t support grayscale

3.1.21. getDisplayMode: #J(?)*

Response:
#J(1)* - 3 bit mode
#J(0)* - 1 bit mode

3.1.22. clearDisplay: #K(1)*

Clears display.

3.1.23. display: #L(1)*

Displays image buffer data to screen.

3.1.24. partialUpdate: #M(YY1, XX2, YY2)*

YY1 - Start Y position of part of the screen that will be updated
XX2 - End X position of part of the screen that will be updated
YY2 - End Y position of part of the screen that will be updated
example:
#M(005,400,040)*
Note: This will not work on Inkplate 2, because it has no partialUpdate support

3.1.25. readTemperature: #N(?)*

Response:
#N(23)* - 23 Celsius degrees
Note: Not supported on Inkplate 2

3.1.26. readTouchpad: #O(P)*

P - Name of pad that needs to be read (1, 2 or 3)
Response:
#O(1)* for high state of pad
or
#O(0)* for low state of pad
Note: Not supported on Inkplate 2

3.1.27. readBattery: #P(?)*

Response:
#P(3.65)* - Measured voltage on battery is 3.65VDC
Note: Not supported on Inkplate 2

3.1.28. panelSupply(einkOff/on):#Q(S)*

S - State of panel power supply (S = 1 -> panel has power supply, S = 0 -> panel power supply has benn turned off)
Note: Not supported on Inkplate 2

3.1.29. getPanelState: #R(?)*

Response:
#R(1)* - panel has power supply or #R(0)* - panel supply has been turned off
Note: Not supported on Inkplate 2

3.1.30. drawImage: #S(XXX,YYY,”PATH”)*

XXX - X position of bitmap on display
YYY - Y position of bitmap on display
PATH - path to bitmap image on SD card, where path should be sent as HEX Char (same as for print command). Example: /image1.bmp should be sent as 2f696d616765312e626d70
example: (2f696d616765312e626d70 means /image1.bmp)
#S(000,000,"2f696d616765312e626d70")*

| Response:
Note: This will not work on Inkplate 2, it has no SD card slot

3.1.31. drawThickLine: #T(XXX,YYY,III,JJJ,TT,CC)*

XXX - Start x coordinate (with leading zeros)
YYY - Start y coordinate (with leading zeros)
III - End x coordinate (with leading zeros)
JJJ - End y coordinate (with leading zeros)
TT - Line thickness
CC - Color (with leading zeros)
example:
#T(001,004,010,123,05,01)*

3.1.32. drawElipse: #U(XXX,YYY,RRX,RRY,CC)*

XXX - Start x coordinate (with leading zeros)
YYY - Start y coordinate (with leading zeros)
RRX - X radius (with leading zeros)
RRY - Y radius (with leading zeros)
CC - Color (with leading zeros)
example:
#U(050,100,040,070,01)*

3.1.33. fillElipse: #V(XXX,YYY,RRX,RRY,CC)*

XXX - Start x coordinate (with leading zeros)
YYY - Start y coordinate (with leading zeros)
RRX - X radius (with leading zeros)
RRY - Y radius (with leading zeros)
CC - Color (with leading zeros)
example:
#V(050,100,040,070,01)*

3.1.34. rtcSetTime: #W(H,M,S)*

H - Hours
M - Minutes
S - Seconds
example:
#W(15,22,30)*

3.1.35. rtcSetDate: #X(WD,D,M,Y)*

WD - weekday
D - day
M - month
Y - year
example:
#X(4,23,3,2023)*

3.1.36. rtcSetEpoch: #Y(E)*

E - Time in epoch
example:
#Y(1679581587)*

3.1.37. rtcGetRtcData: #a(D)*

D - What data do you want to return? [0, 6]
0 - rtcGetSecond();
1 - rtcGetMinute();
2 - rtcGetHour();
3 - rtcGetDay();
4 - rtcGetWeekday();
5 - rtcGetMonth();
6 - rtcGetYear();
example:
#a(2)*  or #a(5)*

3.1.38. rtcSetAlarm: #b(AS,AM,AH,AD,AW)*

AS - Alarm seconds
AM - Alarm minutes
AH - Alarm hours
AD - Alarm day
AW - Alarm weekday
example:
#b(0,30,15,23,4)*

3.1.39. rtcSetAlarmEpoch: #c(AE,AMC)*

AE - Alarm epoch
AMC - Alarm matching (see System.h)
example:
#c(1679581587, 2)*

3.1.40. rtcCheckAlarmFlag: #d(?)*

Response:
#d(1)* - if the alarm flag is 1
#d(0)* - if the alarm flag is 0

3.1.41. rtcClearAlarmFlag: #e(1)*

Clears alarm flag.

3.1.42. rtcGetAlarm: #f(D)*

D - Which component of the alarm want to get [0, 4]
0 - rtcGetAlarmSecond();
1 - rtcGetAlarmMinute();
2 - rtcGetAlarmHour();
3 - rtcGetAlarmDay();
4 - rtcGetAlarmWeekday();
example:
#f(3)* or #f(1)*

3.1.43. rtcTimerSet: #g(SC,V,IE,IP)*

SC - rtcCountdownSrcClock -> [0,3], see System.h
V - Coundowntime in seconds
IE -> 1 = enable interrupt; 0 = disable interrupt
IP -> 1 = interrupt generate a pulse; 0 = interrupt follows timer flag
example:
#g(2,10,0,0)*

3.1.44. rtcCheckTimerFlag: #h(?)*

Response:
#h(1)* - if the flag is 1
#h(0)* - if the flag is 0

3.1.45. rtcClearTimerFlag: #i(1)*

Clears timer flag.

3.1.46. rtcDisableTimer: #j(1)*

Disables the timer.

3.1.47. rtcIsSet: #k(?)*

Response:
#k(0)* - if RTC is not set
#k(1)* - if RTC is set

3.1.48. rtcReset: #l(1)*

Resets RTC

Note: Next functions are only for Inkplate 6PLUS

3.1.49. frontlight: #m(F)*

F -> 1 to turn on; 0 to turn off the frontlight
example:
#m(1)* or #m(0)*

3.1.50. setFrontlight: #n(BR)*

BR - brightness [0, 63]
example:
#n(50)*

3.1.51. tsInit: #o(PWRS)*

PWRS -> 1 for display.tsInit(1); 0 for display.tsInit(0);
example:
#o(1)* or #o(0)*

3.1.52. tsShutdown: #p(1)*

Turns off touchscreen power.

3.1.53. tsAvailable: #r(?)*

Response:
#r(0)* - if not available or
#r(1)* - if available

3.1.54. tsGetData: #s(?)*

Response:
#s(x, y)*

3.1.55. tsGetRawData: #t(?)*

Response: raw data from the touchscreen in binary format

3.1.56. touchInArea: #u(XXX,YYY,TW,TH)*

touchInArea checks if touch occured in given rectangle area.
XXX - rectangle top left corner x plane
YYY - rectangle top left corner y plane
TW - rectangle width
TH - rectangle height
example:
#u(0,0,200,300)*