Simple Hello World with PlatformIO and M5Dial
-
I am just getting started with M5Dial. I have some programs working in Arduino studio program but Visual Studio Code and PlatformIO seems way better.
Here is where I am stuck:
I have the platformio.ini file like this:[env:m5stack-cores3]
platform = espressif32
board = m5stack-cores3
framework = arduinolib_deps =
m5stack/M5Dial
m5stack/M5GFX
m5stack/M5Unifiedupload_speed = 115200
monitor_speed = 115200and my main.cpp program is simply:
#include <Arduino.h>
#include "M5Dial.h"
#include <WiFi.h>
#include <M5GFX.h>void setup() {
// put your setup code here, to run once:
auto cfg = M5.config();
M5Dial.begin(cfg, true, true);
M5Dial.Display.setBrightness(34);
M5Dial.Display.fillScreen(0xABE1);
M5Dial.Display.setTextDatum(4);
Serial.print("Test");
}void loop() {
// put your main code here, to run repeatedly:
}Everything compiles and uploads but screen is blank. Serial monitor equivalent complains about a lot.
Did I choose the wrong board?
board = m5stack-cores3 -
After I wrote all of this I figured out I did have the wrong board specified:
board = m5stack-stamps3
seems to be correct.Now I can't get USBSerial functions to work, and previously any Serial.print statements didn't work but I am one step further!
-
@uberdweeb Hello! Sorry for late answer, but I have the fix for it. All you need to do is modify the platformio.ini file, and write this into it:
[env:m5stack-stamps3] platform = espressif32 board = m5stack-stamps3 framework = arduino build_flags = -DARDUINO_USB_CDC_ON_BOOT=1 monitor_speed = 115200
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login