pdf-icon

Arduino Quick Start

2. Devices & Examples

6. Applications

Atom EchoS3R Arduino Program Compile & Upload

1.Preparation

  • 3.Library installation: Refer to the Library Installation Guide to install the M5Unified and M5GFX libraries, and install all required dependencies as prompted.

2.Port Selection

Connect the device to the computer using a USB-C cable. Press and hold the side reset button for 3 seconds until the green LED flashes. The device will then enter download mode, and you can select the corresponding main controller and device port in Arduino IDE.

3.Program Compile & Upload

cpp
1 2 3 4 5 6 7 8 9 10 11 12
#include "M5Unified.h"

void setup() {
  M5.begin();
}

void loop() {
  M5.Speaker.tone(7000, 100);  // frequency, duration
  delay(1000);
  M5.Speaker.tone(4000, 20);  // frequency, duration
  delay(1000);
}

Copy the above program into Arduino IDE, click the upload button, and after compilation and uploading, the program will use the speaker to play beep sounds.

4.Related Resources

On This Page