Apparently M5.Display.powerSaveOn() reduces the RGB color space to just a few base colors, I suppose to save PSRAM bandwith and power. As a result all your colors are way off when powersave is on.
Latest posts made by dheijl
-
Tab5 Display Power Save
-
Tab5: Arduino configTime and configTzTime return the wrong date and time (way off)
The configTime() or configTzTime() functions do not return errors but the returned date and time are way off: up to 2 days in the future and totally wrong time too.
The esp32 code shown in this makernote works without fail on the same Tab5 device.
my platformio.ini:
[env:esp32p4_pioarduino] platform = https://github.com/pioarduino/platform-espressif32.git#54.03.21 upload_speed = 1500000 monitor_speed = 115200 build_type = debug framework = arduino board = esp32-p4-evboard board_build.mcu = esp32p4 board_build.flash_mode = qio board_build.partitions = default_16MB.csv board_build.filesystem = spiffs build_flags = -DBOARD_HAS_PSRAM -DCORE_DEBUG_LEVEL=5 -DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_USB_MODE=1 lib_deps = https://github.com/M5Stack/M5Unified.git https://github.com/M5Stack/M5GFX.gitOther Arduino stuff is broken too: after wakeup from lightsleep the display does not work properly half of the time: the cursor position is sometimes totally off, or sometimes it does not wake at all. I suppose the display needs a hardware reset via a GPIO, but can't find any mention of this in the docs.
But the hardware is very nice indeed. Especially the undocumented coin battery backup for the RTC is a nice surprise!
-
RE: M5Paper wakeup cause
To make this detection really reliable I had to change the RTC register check like this:
Wire.begin(21, 22); uint8_t reason = M5.RTC.readReg(0x01); // now it's safe M5.begin(); // check reboot reason flag: TIE (timer int enable) && TF (timer flag active) if ((reason & 0b0000101) == 0b0000101) { restartByRTC = true; Serial.println("Reboot by RTC"); } else { restartByRTC = false; Serial.println("Reboot by power button / USB"); } -
M5Core2 remote controller and display for MoodeAudio player (MPD)
https://github.com/dheijl/M5Core2MpdCli
My RPI MoodeAudio players do not have a display, so I added a remote one, using the M5Core2, that allows me to:
- load the initial/updated config from SD and save it to flash (NVS)
- select the MPD player from a list if you have more than one player (I do)
- see what's currently playing
- select a favourite radio station from a list of favourites (configured in Moode or not, the url is all that MPD needs)
- stop/start playing
I suppose it would work with any MPD based audio player.