generated from m5stack/M5Template-C-CPP
-
Notifications
You must be signed in to change notification settings - Fork 26
Closed
Description
Describe the bug
I have been using the M5StickC and M5StickC-PLUS with Arduino for over a year with a lot of success.
I thought I would like to try the Atom S3 as a smaller device for the same MQTT and I2C tasks,
I have selected M5Stack-AtomS3 from the M5Stack Arduino board manager (after adding the URL for the library)
Pasting your example Button code into Arduino and trying to flash to Com3
All I get is an error message saying -
Arduino: 1.8.13 (Windows 10), Board: "M5Stack-ATOM, Default, 1500000, None"
RepeatTimer:15:22: fatal error: M5AtomS3.h: No such file or directory
compilation terminated.
exit status 1
M5AtomS3.h: No such file or directory
To reproduce
- On a Windows 10 with Arduino 1.8.13
- Using the sample Button.ino code
/*
*******************************************************************************
* Copyright (c) 2022 by M5Stack
* Equipped with M5AtomS3 sample source code
* 配套 M5AtomS3 示例源代码
* Visit for more information: https://docs.m5stack.com/en/core/AtomS3
* 获取更多资料请访问: https://docs.m5stack.com/zh_CN/core/AtomS3
*
* Describe: Button example. 按键示例
* Date: 2022/12/18
*******************************************************************************
Press button to display the corresponding output on the screen and
USBserial. 按下按键,在屏幕和串口上显示相应输出
*/
#include <M5AtomS3.h>
/* After M5AtomS3 is started or reset
the program in the setUp () function will be run, and this part will only be
run once. 在 M5AtomS3
启动或者复位后,即会开始执行setup()函数中的程序,该部分只会执行一次。 */
void setup() {
M5.begin(true, true, false, false); // Init M5AtomS3. 初始化 M5AtomS3
M5.Lcd.println("Pls Press Btn");
}
/* 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() {
M5.update(); // Read the press state of the key. 读取按键 A, B, C 的状态
if (M5.Btn.wasReleased() || M5.Btn.pressedFor(1000)) {
USBSerial.print('A');
M5.Lcd.print("A");
}
}
Expected behavior
I was kind of hoping it would just work
Screenshots
No response
Environment
- OS: Windows 10
- IDE & IDE Version: Arduino 1.8.13
- Repository Version: https://github.com/m5stack/M5AtomS3/blob/main/examples/Basics/Button/Button.ino
Additional context
No response
Issue checklist
- I searched for previous reports in the issue tracker
- My report contains all necessary details
Metadata
Metadata
Assignees
Labels
No labels