SKU:U120
















Unit LCD is a 1.14-inch color LCD expansion display unit. It uses the ST7789V2 driver solution with a resolution of 135 x 240 and supports RGB666 display (262,144 colors). It integrates an ESP32-PICO control core internally (with built-in firmware, making display development more convenient), and supports control and firmware upgrades via the I2C communication interface (addr: 0x3E). A magnetic attachment design is integrated on the back of the screen, allowing it to be easily fixed to metal surfaces. This LCD expansion display is suitable for embedding into various instruments or control devices that require simple content display as a display panel.
| Specification | Parameter |
|---|---|
| Display Driver IC | ST7789V2 |
| Operating Current | 45.7mA |
| Communication Interface | I2C @ 0x3E |
| Display Size | 1.14 inch |
| Pixel Pitch | 0.1101 (H) x 0.1038 (V) mm |
| Resolution | 135 x 240 |
| Viewing Angle | Full viewing angle |
| Operating Temperature | 0 ~ 60°C |
| Housing Material | Plastic (PC) |
| Product Size | 48.0 x 24.0 x 8.0mm |
| Product Weight | 8.6g |
| Package Size | 68.0 x 57.0 x 17.0mm |
| Gross Weight | 21.3g |
| HY2.0-4P | Black | Red | Yellow | White |
|---|---|---|---|---|
| PORT.A | GND | 5V | SDA | SCL |
#include <M5UnitLCD.h>
M5UnitLCD display;
M5Canvas canvas(&display);
static constexpr char text[] = "Hello world ! こんにちは世界! this is long long string sample. 寿限無、寿限無、五劫の擦り切れ、海砂利水魚の、水行末・雲来末・風来末、喰う寝る処に住む処、藪ら柑子の藪柑子、パイポ・パイポ・パイポのシューリンガン、シューリンガンのグーリンダイ、グーリンダイのポンポコピーのポンポコナの、長久命の長助";
static constexpr size_t textlen = sizeof(text) / sizeof(text[0]);
int textpos = 0;
int scrollstep = 2;
void setup(void)
{
display.init();
display.setRotation(2);
canvas.setColorDepth(1); // mono color
canvas.setFont(&fonts::lgfxJapanMinchoP_32);
canvas.setTextWrap(false);
canvas.setTextSize(2);
canvas.createSprite(display.width() + 64, 72);
}
void loop(void)
{
int32_t cursor_x = canvas.getCursorX()-scrollstep;
if (cursor_x <= 0)
{
textpos = 0;
cursor_x = display.width();
}
canvas.setCursor(cursor_x, 0);
canvas.scroll(-scrollstep, 0);
while (textpos < textlen && cursor_x <= display.width())
{
canvas.print(text[textpos++]);
cursor_x = canvas.getCursorX();
}
display.waitDisplay();
canvas.pushSprite(&display, 0, (display.height()-canvas.height()) >> 1);
} ※ Undefined commands are treated as no-operation instructions.
| hex | len | command | description | send params |
|---|---|---|---|---|
| 0x00 | 1-∞ | NOP | Do nothing until communication stops | [0] 0x00 [1-∞] Ignored value |
| 0x20 | 1 | INVOFF | Disable color inversion | [0] 0x20 |
| 0x21 | 1 | INVON | Enable color inversion | [0] 0x21 |
| 0x22 | 2 | BRIGHTNESS | Backlight brightness setting 0:Off-255:Full lights | [0] 0x22 [1] Brightness (0-255) |
| 0x23 | 7 | COPYRECT | Copy rectangular area | [0] 0x23 [1] Copy source X_Left [2] Copy source Y_Top [3] Copy source X_Right [4] Copy source Y_Bottom [5] Copy destination X_Left [6] Copy destination Y_Top |
| 0x2A | 3 | CASET | X range selection | [0] 0x2A [1] X_Left [2] X_Right |
| 0x2B | 3 | RASET | Y range selection | [0] 0x2B [1] Y_Top [2] Y_Bottom |
| 0x36 | 2 | ROTATE | Set drawing orientation 0:Normal / 1:90° / 2:180° / 3:270° 4-7: flips 0-3 | [0] 0x36 [1] Setting value (0-7) |
| 0x38 | 2 | SET_POWER | Operating speed setting (power consumption setting) 0:Low / 1:Normal / 2:High | [0] 0x38 [1] Setting value (0-2) |
| 0x39 | 2 | SET_SLEEP | LCD panel sleep setting 0: wake up / 1: sleep | [0] 0x39 [1] Setting value (0-1) |
| 0x41 | 2-∞ | WRITE_RAW_8 | Write image RGB332 | [0] 0x41 [1] RGB332 until communication STOP. |
| 0x42 | 3-∞ | WRITE_RAW_16 | Write image RGB565 | [0] 0x42 [1-2] RGB565 until communication STOP. |
| 0x43 | 4-∞ | WRITE_RAW_24 | Write image RGB888 | [0] 0x43 [1-3] RGB888 until communication STOP. |
| 0x44 | 5-∞ | WRITE_RAW_32 | Write image ARGB8888 | [0] 0x44 [1-4] ARGB8888 until communication STOP. |
| 0x45 | 2-∞ | WRITE_RAW_A | Write image A8 alpha channel only. Use the last drawing color. | [0] 0x45 [1] A8 until communication STOP. |
| 0x49 | 3-∞ | WRITE_RLE_8 | Write RLE image RGB332 | [0] 0x49 [1-∞] RLE Data |
| 0x4A | 4-∞ | WRITE_RLE_16 | Write RLE image RGB565 | [0] 0x4A [1-∞] RLE Data |
| 0x4B | 5-∞ | WRITE_RLE_24 | Write RLE image RGB888 | [0] 0x4B [1-∞] RLE Data |
| 0x4C | 6-∞ | WRITE_RLE_32 | Write RLE image ARGB8888 | [0] 0x4C [1-∞] RLE Data |
| 0x4D | 3-∞ | WRITE_RLE_A | Draw RLE image A8 alpha channel only. Use the last drawing color. | [0] 0x4D [1-∞] RLE Data |
| 0x50 | 1 | RAM_FILL | Fill selected area with the last drawing color | [0] 0x50 |
| 0x51 | 2 | SET_COLOR_8 | Set drawing color by RGB332 | [0] 0x51 [1] RGB332 |
| 0x52 | 3 | SET_COLOR_16 | Set drawing color by RGB565 | [0] 0x52 [1-2] RGB565 |
| 0x53 | 4 | SET_COLOR_24 | Set drawing color by RGB888 | [0] 0x53 [1-3] RGB888 |
| 0x54 | 5 | SET_COLOR_32 | Set drawing color by ARGB8888 | [0] 0x54 [1-4] ARGB8888 |
| 0x60 | 3 | DRAWPIXEL | Draw single pixel Use stored drawing color | [0] 0x60 [1] X [2] Y |
| 0x61 | 4 | DRAWPIXEL_8 | Draw single pixel RGB332 1Byte for color specification | [0] 0x61 [1] X [2] Y [3] RGB332 |
| 0x62 | 5 | DRAWPIXEL_16 | Draw single pixel RGB565 2Byte for color specification | [0] 0x62 [1] X [2] Y [3-4] RGB565 |
| 0x63 | 6 | DRAWPIXEL_24 | Draw single pixel RGB888 3Byte for color specification | [0] 0x63 [1] X [2] Y [3-5] RGB888 |
| 0x64 | 7 | DRAWPIXEL_32 | Draw single pixel ARGB8888 4Byte for color specification Alpha blending | [0] 0x64 [1] X [2] Y [3-6] ARGB8888 |
| 0x68 | 5 | FILLRECT | Fill rectangle Use stored drawing color | [0] 0x68 [1] X_Left [2] Y_Top [3] X_Right [4] Y_Bottom |
| 0x69 | 6 | FILLRECT_8 | Fill rectangle RGB332 1Byte for color specification | [0] 0x69 [1] X_Left [2] Y_Top [3] X_Right [4] Y_Bottom [5] RGB332 |
| 0x6A | 7 | FILLRECT_16 | Fill rectangle RGB565 2Byte for color specification | [0] 0x6A [1] X_Left [2] Y_Top [3] X_Right [4] Y_Bottom [5-6] RGB565 |
| 0x6B | 8 | FILLRECT_24 | Fill rectangle RGB888 3Byte for color specification | [0] 0x6B [1] X_Left [2] Y_Top [3] X_Right [4] Y_Bottom [5-7] RGB888 |
| 0x6C | 9 | FILLRECT_32 | Fill rectangle ARGB8888 4Byte for color specification Alpha blending | [0] 0x6C [1] X_Left [2] Y_Top [3] X_Right [4] Y_Bottom [5-8] ARGB8888 |
| 0xA0 | 4 | CHANGE_ADDR | Change I2C address [2] specifies the bit-inverted value of [1] | [0] 0xA0 [1] New I2C address [2] Bitwise inversion of [1] [3] 0xA0 |
| hex | len | command | description | return values |
|---|---|---|---|---|
| 0x04 | 1 | READ_ID | ID and firmware version Receive 4 bytes | [0] 0x77 [1] 0x89 [2] Major version [3] Minor version |
| 0x09 | 1 | READ_BUFCOUNT | Get remaining command buffer Larger value means more space | [0] Remaining buffer (0~255) Repeated reading supported |
| 0x81 | 1 | READ_RAW_8 | Read RGB332 image | [0] RGB332 Repeat until communication STOP |
| 0x82 | 1 | READ_RAW_16 | Read RGB565 image | [0-1] RGB565 Repeat until communication STOP |
| 0x83 | 1 | READ_RAW_24 | Read RGB888 image | [0-2] RGB888 Repeat until communication STOP |



