I have a working Core2 for AWS, it was working perfectly fine, then I start playing with some code, I tried this
M5.begin(true, true, true, true);
M5.Power.begin();
M5.Lcd.setTextSize(2);
M5.Lcd.printf("\nConnecting to %s", WIFI_SSID);
But the screen won’t turn on, I can see the logs that is working on the serial port.
My platformio.ini
[env:core2foraws]
platform = espressif32
framework = arduino
board = m5stack-core2
monitor_speed = 115200
upload_speed = 2000000
upload_protocol = esptool
board_build.f_flash = 80000000L
board_build.flash_mode = dio
build_unflags = -mfix-esp32-psram-cache-issue
build_flags =
-Os
-pipe
-Wall
-std=gnu++11
lib_deps =
knolleary/PubSubClient@^2.8
ssilverman/libCBOR@^1.6.1
skhaz/ZSTD@^1.0.2
M5Stack
NTPClient
My code
#include <M5Stack.h>
static const char WIFI_SSID[] = "My WiFi";
static const char WIFI_PASSWORD[] = "hakunamatata";
void setup()
{
M5.begin(true, true, true, true);
M5.Power.begin();
M5.Lcd.setTextSize(2);
M5.Lcd.printf("\nConnecting to %s", WIFI_SSID);
Serial.begin(115200);
WiFi.mode(WIFI_STA);
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
while (WiFi.status() != WL_CONNECTED)
{
delay(100);
}
Serial.println();
Serial.print("Connected to: ");
Serial.println(WIFI_SSID);
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
}
void loop()
{
M5.update();
delay(1000);
}
What I am doing wrong?