Arduino IDE environment - ATOM S3

Arduino-IDE

M5Stack's board management

  • 1.Open the Arduino IDE, select File->Preferences->Settings
  • 2.Copy the M5Stack board management URL below to the Additional Development Board Manager:
https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json
  • 3.Select Tools->Development Board:->Development Board Manager...
  • 4.In the new pop-up dialog box, enter and search for M5Stack, click Install (If the search fails, you can try to restart the Arduino program)

? >Note: Compiling AtomS3 requires at least version 2.0.6 and above

  • 5.Select Tools->Development board:->M5Stack Arduino, and select the corresponding development board configuration according to the device we are using (M5Stack-Atom).
  • Different hardware devices have different sample program libraries. Please choose to download according to the device you are using. Open the Arduino IDE, and then select Project->Load Library->Library Management...

For AtomS3

  • Search for M5AtomS3 and install it, as shown in the figure below. When downloading, please follow the pop-up prompts to install related dependent libraries.

Turn on the LED light

  • Copy the code below to the Arduino IDE, connect ATOM S3 to the PC and configure the correct port (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 display the words "Hello World" on the LCD screen.
#include "M5AtomS3.h"
/* After AtomS3 is started or reset the program in the setUp ()
function will be run, and this part will only be run once.
在 AtomS3 启动或者复位后,即会开始执行setup()函数中的程序,该部分只会执行一次。
*/
void setup() {
    M5.begin(true, true, false,
             false);  // Init AtomS3(Initialize LCD, serial port).
                      // 初始化 AtomS3(初始化LCD、串口)
    M5.Lcd.println("Hello World");
}

/* 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() {
}