Closed jonkiszp closed 1 year ago
Use this code and it will compile
#include <M5Stack.h>
#include <SPI.h>
#include <Update.h>
void setup() {
Serial.begin(500000);
M5.begin(true, true, false, true);
M5.Lcd.fillScreen(BLACK);
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
M5.Lcd.setCursor(10, 10);
if (M5.Power.canControl()) {
M5.Lcd.print(M5.Power.getBatteryLevel());
} else {
M5.Lcd.print("Can't control!");
}
delay(5000);
}
Describe the bug
When I try to use these two libraries in one project I get an error.
https://gitlab.com/painlessMesh/painlessMesh
To reproduce
code: `#include
include
void setup() { Serial.begin(500000); M5.begin(true, true, false, true); M5.Lcd.fillScreen(BLACK); // put your setup code here, to run once: }
void loop() { // put your main code here, to run repeatedly: M5.Lcd.setCursor(10,10); if (M5.Power.canControl()) { M5.Lcd.print(M5.Power.getBatteryLevel()); } else { M5.Lcd.print("Can't control!"); } delay(5000); }`
ini
[env:m5stack-core-esp32] platform = espressif32 board = m5stack-core-esp32 framework = arduino lib_deps = m5stack/M5Stack@^0.4.3 painlessmesh/painlessMesh@^1.5.0 monitor_speed = 500000
and build in Platformio 6.1.5
Expected behavior
Verbose mode can be enabled via
-v, --verbose
option CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/m5stack-core-esp32.html PLATFORM: Espressif 32 (5.2.0) > M5Stack Core ESP32 HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa) PACKAGES:include
compilation terminated. *** [.pio\build\m5stack-core-esp32\lib3f6\painlessMesh\painlessMeshSTA.cpp.o] Error 1 In file included from .pio/libdeps/m5stack-core-esp32/painlessMesh/src/painlessmesh/mesh.hpp:12, from .pio/libdeps/m5stack-core-esp32/painlessMesh/src/painlessMeshSTA.h:6, from .pio/libdeps/m5stack-core-esp32/painlessMesh/src/arduino/wifi.hpp:8, from .pio/libdeps/m5stack-core-esp32/painlessMesh/src/wifi.cpp:1: .pio/libdeps/m5stack-core-esp32/painlessMesh/src/painlessmesh/ota.hpp:13:10: fatal error: Update.h: No such file or directory
include
compilation terminated. *** [.pio\build\m5stack-core-esp32\lib3f6\painlessMesh\wifi.cpp.o] Error 1
Environment
Issue checklist