Cardputer display disabled after uploading sample Display code from Github
-
I uploaded this to test product for first time and out put said "Hard reset" now display is off.
/**
- @file display.ino
- @author SeanKwok (shaoxiang@m5stack.com)
- @brief M5Cardputer Display Test
- @version 0.1
- @date 2023-10-09
- @Hardwares: M5Cardputer
- @Platform Version: Arduino M5Stack Board Manager v2.0.7
- @Dependent Library:
- M5GFX: https://github.com/m5stack/M5GFX
- M5Unified: https://github.com/m5stack/M5Unified
*/
#include "M5Cardputer.h"
void draw_function(LovyanGFX* gfx) {
int x = rand() % gfx->width();
int y = rand() % gfx->height();
int r = (gfx->width() >> 4) + 2;
uint16_t c = rand();
gfx->fillRect(x - r, y - r, r * 2, r * 2, c);
}void setup() {
auto cfg = M5.config();
M5Cardputer.begin(cfg);
int textsize = M5Cardputer.Display.height() / 60;
if (textsize == 0) {
textsize = 1;
}
M5Cardputer.Display.setTextSize(textsize);
}void loop() {
int x = rand() % M5Cardputer.Display.width();
int y = rand() % M5Cardputer.Display.height();
int r = (M5Cardputer.Display.width() >> 4) + 2;
uint16_t c = rand();
M5Cardputer.Display.fillCircle(x, y, r, c);
draw_function(&M5Cardputer.Display); -
@insight3fl I uploaded the "Buzzer test" .ino and it successfully loaded ran, and shows "Button Test" across the display. That said, none of the rest buttons seem to function so every time I turn on the device, the sketch is still running and showing the "Buzzer Test" and beeping of course.
How do I restore the Cardputer to factory default? Pushing the go button while turning on does not seem to work.
Thanks for helping a newbee!
-
You'll need to re-upload the factory firmware. I think I saw someone uploaded it 3rd party in M5Burner. If not, I ripped a clean copy of my firmware and I'll share it tomorrow. Just click "ALL" and then search "cardputer" in the search box on the M5Burner app.
-
@4x0nn Thanks! Obviously I am a newbee and have much to learn.
-
@insight3fl burner was fast and easy to retore factory default including a few extras like wifi connect. There is also one other Burner program "Nemo" that works great. I hope for us newbees there will be more packed tools. I am receiving an order today for RFID, Enviromental, motion and a few other plug in modules.
Thank you
-
Thanks so much, I thought I bricked by cardputer and it is back.