Connect the device to the PC, open the device manager to install
FTDI driver
for the device. Take the win10 environment as an example, download the driver file that matches the operating system, unzip it, and install it through the device manager. (Note: In some system environments, the driver needs to be installed twice for the driver to take effect. The unrecognized device name is usually M5Stack
or USB Serial
. Windows recommends using the driver file to install directly in the device manager (custom Update), the executable file installation method may not work properly).
Click here to download FTDI driver
For MacOS users, please tick System Preferences
-> Security and Privacy
-> General
-> Allow downloadable apps from the following locations
-> App Store and Approved Developer Options
.
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-Atom
).Project
->Load Library
->Library Management...
M5Atom
and install it, as shown in the figure below. When downloading, please follow the pop-up prompts to install related dependent libraries.Tools
-> Port
-> COMx
), click the upload button (->
) on the menu bar, the program will It will be automatically compiled and uploaded to the device. The program will light up the LED light on ATOM.
#include "M5Atom.h"
/* After M5Atom is started or reset
the program in the setUp () function will be run, and this part will only be run once.
在 M5Atom 启动或者复位后,即会开始执行setup()函数中的程序,该部分只会执行一次。 */
void setup(){
M5.begin(true, false, true); //Clear the serial port buffer, set the serial port baud rate to 115200; initialize the LED matrix. 清空串口缓冲区,设置串口波特率为 115200;初始化LED矩阵
delay(50);
M5.dis.fillpix(0xff0000); // Fill 0xff0000 to the entire LED dot matrix. 将 0xff0000 填充至整个LED点阵
}
/* 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