Click the link below to download the driver that matches the operating system. There are currently two driver chip versions (CP210X/CH9102). Please download the corresponding driver compressed package according to the version you are using. After decompressing the compressed package, select the installation package corresponding to the number of operating systems to install. (If you are not sure of the USB chip used by your device, you can install both drivers at the same time. During the installation process of CH9102_VCP_SER_MacOS v1.7
, an error may occur, but the installation is actually completed, just ignore it.)
Driver name | Applicable driver chip | Download link |
---|---|---|
CP210x_VCP_Windows | CP2104 | Download |
CP210x_VCP_MacOS | CP2104 | Download |
CP210x_VCP_Linux | CP2104 | Download |
CH9102_VCP_SER_Windows | CH9102 | Download |
CH9102_VCP_SER_MacOS v1.7 | CH9102 | Download |
File
->Preferences
->Settings
Additional Development Board Manager:
https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json
Tools
->Development Board:
->Development Board Manager...
M5Stack
, click Install
(If the search fails, you can try to restart the Arduino program)Tools
->Development board:
->M5Stack Arduino
, and select the corresponding development board configuration according to the device we are using (M5Stack-Paper
).Project
->Load Library
->Library Management...
CoreInk
and install it, as shown in the figure below. When downloading, please follow the pop-up prompts to install related dependent libraries.M5Stack-CoreInk
in the pop-up dialog box -> click Install
Tools
-> Port
-> COMx
), click the upload button (->
) on the menu bar, The program will be automatically compiled and uploaded to the device. The program will print the string "Hello World" on the screen of M5-CoreInk.
#include "M5CoreInk.h"
Ink_Sprite InkPageSprite(&M5.M5Ink);
/* After CoreInk is started or reset
the program in the setUp () function will be run, and this part will only be run once.
在 CoreInk 启动或者复位后,即会开始执行setup()函数中的程序,该部分只会执行一次。 */
void setup() {
M5.begin(); //Init CoreInk. 初始化 CoreInk
if( !M5.M5Ink.isInit()) //Init CoreInk screen. 初始化 CoreInk 屏幕
{
Serial.printf("Ink Init faild"); //如果初始化失败,打印信息
while (1) delay(100);
}
M5.M5Ink.clear(); //Clear screen. 清屏
delay(1000);
if( InkPageSprite.creatSprite(0,0,200,200,true) != 0) //Create a sprite. 创建一个画布
{
Serial.printf("Ink Sprite creat faild");
}
InkPageSprite.drawString(35,50,"Hello World!"); //Draw a string. 绘制一个字符串
InkPageSprite.pushSprite(); //Push the sprite to the screen. 将画布绘制到屏幕上
}
/* After the program in setup() runs, it runs the program in loop()
The loop() function is an infinite loop in which the program runs repeatedly
在setup()函数中的程序执行完后,会接着执行loop()函数中的程序
loop()函数是一个死循环,其中的程序会不断的重复运行 */
void loop() {
}
Github
Arduino API