Skip to content

nopnop2002/esp-idf-m5stickC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

esp-idf-m5stickC

Example code for driving M5StickC ST7735S display using ESP-IDF's SPI driver.

M5StickC-2

Software requirements

esp-idf v4.4/v5.x.

How to build

git clone https://github.com/nopnop2002/esp-idf-m5stickC
cd esp-idf-m5stickC/
idf.py set-target esp32
idf.py menuconfig
idf.py flash -b 115200 monitor

*There is no MENU ITEM where this application is peculiar.

You need to specify Baud rate for flashing.

Graphic support

M5StickC-3

M5StickC-4

M5StickC-5

M5StickC-8

Fonts support

It's possible to text rotation and invert.
M5StickC-6

M5StickC-7

It's possible to indicate more than one font at the same time.
Gothic Font.
M5StickC-9

Mincyo Font.
M5StickC-10

Font File

You can add your original font file.
The format of the font file is the FONTX format.
Your font file is put in font directory.
Your font file is uploaded to SPIFFS partition using meke flash.

Please refer this page about FONTX format.

FontxFile yourFont[2];
InitFontx(yourFont,"/spiffs/your_font_file_name","");
uint8_t ascii[10];
strcpy((char *)ascii, "MyFont");
lcdDrawString(dev, yourFont, x, y, ascii, color);

How to add your color

Change here.

#define RED    rgb565(255,   0,   0) // 0xf800
#define GREEN  rgb565(  0, 255,   0) // 0x07e0
#define BLUE   rgb565(  0,   0, 255) // 0x001f
#define BLACK  rgb565(  0,   0,   0) // 0x0000
#define WHITE  rgb565(255, 255, 255) // 0xffff
#define GRAY   rgb565(128, 128, 128) // 0x8410
#define YELLOW rgb565(255, 255,   0) // 0xFFE0
#define CYAN   rgb565(  0, 156, 209) // 0x04FA
#define PURPLE rgb565(128,   0, 128) // 0x8010

Reference

https://github.com/nopnop2002/esp-idf-m5stickC-Plus

About

M5StickC ST7735S Driver for esp-idf

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages