NEED HELP: No screen, PaperS3 beeps and returns Serial monitor communication....
-
Below is my code for Arduino. I have it set up from the website (libraries, boards, settings) including the older EPDiy library. I am getting beeps. I am getting communication between the device and the IDE on the Serial Monitor. Just no screen. I get lines on startup (screen clearing, seemingly), but nothing after that. Can you tell me what I am doing wrong? Thanks!
This too:
You can see the picture says ESP32S3 Dev Module. I also tried using M5Stack M5PaperS3 as the board. Tried multiple USB Ports. It communicates, I said that... I am just stuck. Please help if you can. Thank you all!
Here is my code:
#define M5STACK_PAPERS3
#include <M5Unified.h>void setup() {
Serial.begin(115200);
delay(500);
Serial.println("Starting M5Stack PaperS3 Test");auto cfg = M5.config();
M5.begin(cfg);M5.Display.setRotation(0);
M5.Display.setTextSize(3);
M5.Display.setTextColor(TFT_BLACK);M5.Speaker.tone(2000, 100);
}void loop() {
Serial.println("Refreshing e-ink display...");M5.Display.startWrite();
M5.Display.fillScreen(TFT_WHITE); // Clear screen
M5.Display.setCursor(40, 120);
M5.Display.print("Hello World!");
M5.Display.endWrite(); // Push to e-ink screenM5.Speaker.tone(2500, 100);
Serial.println("Done updating.");delay(2000);
} -
Hello @RadghKris
I think it might help to include
epdiy.h
beforeUnified.h
in your code. E.g.#include <epdiy.h> #include <M5Unified.h>
Please see this post.
And maybe also check this documentation - Section 6.Program Compilation & Burning.
Thanks
Felix -
@felmue Thank you for your reply! I will check this when I get back to my workstation tonight. I will keep you posted!
-
@felmue I am failing on compiling now.
c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c: In function 'init_ckv_rmt':
c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c:181:53: error: 'const struct <anonymous>' has no member named 'module'
181 | periph_module_reset(rmt_periph_signals.groups[0].module);
| ^
c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c:182:54: error: 'const struct <anonymous>' has no member named 'module'
182 | periph_module_enable(rmt_periph_signals.groups[0].module);
| ^
c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c: In function 'deinit_ckv_rmt':
c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c:216:53: error: 'const struct <anonymous>' has no member named 'module'
216 | periph_module_reset(rmt_periph_signals.groups[0].module);
| ^
c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c:217:55: error: 'const struct <anonymous>' has no member named 'module'
217 | periph_module_disable(rmt_periph_signals.groups[0].module);
| ^
c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c: In function 'init_bus_gpio':
c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c:339:28: error: 'lcd_periph_signals' undeclared (first use in this function); did you mean 'rmt_periph_signals'?
339 | DATA_LINES[i], lcd_periph_signals.panels[0].data_sigs[i], false, false
| ^~~~~~~~~~~~~~~~~~
| rmt_periph_signals
c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c:339:28: note: each undeclared identifier is reported only once for each function it appears in
c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c: In function 'init_lcd_peripheral':
c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c:487:26: error: 'lcd_periph_signals' undeclared (first use in this function); did you mean 'rmt_periph_signals'?
487 | periph_module_enable(lcd_periph_signals.panels[0].module);
| ^~~~~~~~~~~~~~~~~~
| rmt_periph_signals
c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c: In function 'deinit_lcd_peripheral':
c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c:562:25: error: 'lcd_periph_signals' undeclared (first use in this function); did you mean 'rmt_periph_signals'?
562 | periph_module_reset(lcd_periph_signals.panels[0].module);
| ^~~~~~~~~~~~~~~~~~
| rmt_periph_signals
c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c: In function 'epd_lcd_set_pixel_clock_MHz':
c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c:624:78: error: passing argument 4 of 'lcd_hal_cal_pclk_freq' makes pointer from integer without a cast [-Wint-conversion]
624 | = lcd_hal_cal_pclk_freq(&lcd.hal, 240000000, lcd.config.pixel_clock, flags, &clk_div);
| ^~~~~
| |
| int
In file included from c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c:49:
C:\Users\radgh\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/hal/include/hal/lcd_hal.h:47:129: note: expected 'hal_utils_clk_div_t *' but argument is of type 'int'
47 | uint32_t lcd_hal_cal_pclk_freq(lcd_hal_context_t hal, uint32_t src_freq_hz, uint32_t expect_pclk_freq_hz, hal_utils_clk_div_t lcd_clk_div);
| ~~~~~~~~~~~^
c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c:624:11: error: too many arguments to function 'lcd_hal_cal_pclk_freq'
624 | = lcd_hal_cal_pclk_freq(&lcd.hal, 240000000, lcd.config.pixel_clock, flags, &clk_div);
| ^
C:\Users\radgh\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/hal/include/hal/lcd_hal.h:47:10: note: declared here
47 | uint32_t lcd_hal_cal_pclk_freq(lcd_hal_context_t hal, uint32_t src_freq_hz, uint32_t expect_pclk_freq_hz, hal_utils_clk_div_t lcd_clk_div);
| ^~~~~~~~~~~~~~~~~~~~~
exit status 1Compilation error: exit status 1
In my novice mind, this looks like undeclared variables... in the epdiy library? I performed a 'git bash' on the epdiy library to get the right version. the "git reset" command from the setup instructions. Going to check out the rest of your suggestions now.
Picture just in case this helps.
-
And maybe also check this documentation - Section 6.Program Compilation & Burning.
I'll go back to basics with this again tonight.
Also, Zhu got back to me from M5STACK and told me they are working on getting us an example code. Should be soon.
-
@felmue Ok. Started tonight with that documentation and paid special attention to the settings. Step by step. #include <epdiy.h> at the top. Are we sure the version of EPDiy shouldn't be 2.0.0?
Here are my error messages:
c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c: In function 'init_ckv_rmt': c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c:181:53: error: 'const struct <anonymous>' has no member named 'module' 181 | periph_module_reset(rmt_periph_signals.groups[0].module); | ^ c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c:182:54: error: 'const struct <anonymous>' has no member named 'module' 182 | periph_module_enable(rmt_periph_signals.groups[0].module); | ^ c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c: In function 'deinit_ckv_rmt': c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c:216:53: error: 'const struct <anonymous>' has no member named 'module' 216 | periph_module_reset(rmt_periph_signals.groups[0].module); | ^ c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c:217:55: error: 'const struct <anonymous>' has no member named 'module' 217 | periph_module_disable(rmt_periph_signals.groups[0].module); | ^ c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c: In function 'init_bus_gpio': c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c:339:28: error: 'lcd_periph_signals' undeclared (first use in this function); did you mean 'rmt_periph_signals'? 339 | DATA_LINES[i], lcd_periph_signals.panels[0].data_sigs[i], false, false | ^~~~~~~~~~~~~~~~~~ | rmt_periph_signals c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c:339:28: note: each undeclared identifier is reported only once for each function it appears in c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c: In function 'init_lcd_peripheral': c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c:487:26: error: 'lcd_periph_signals' undeclared (first use in this function); did you mean 'rmt_periph_signals'? 487 | periph_module_enable(lcd_periph_signals.panels[0].module); | ^~~~~~~~~~~~~~~~~~ | rmt_periph_signals c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c: In function 'deinit_lcd_peripheral': c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c:562:25: error: 'lcd_periph_signals' undeclared (first use in this function); did you mean 'rmt_periph_signals'? 562 | periph_module_reset(lcd_periph_signals.panels[0].module); | ^~~~~~~~~~~~~~~~~~ | rmt_periph_signals c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c: In function 'epd_lcd_set_pixel_clock_MHz': c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c:624:78: error: passing argument 4 of 'lcd_hal_cal_pclk_freq' makes pointer from integer without a cast [-Wint-conversion] 624 | = lcd_hal_cal_pclk_freq(&lcd.hal, 240000000, lcd.config.pixel_clock, flags, &clk_div); | ^~~~~ | | | int In file included from c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c:49: C:\Users\radgh\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/hal/include/hal/lcd_hal.h:47:129: note: expected 'hal_utils_clk_div_t *' but argument is of type 'int' 47 | uint32_t lcd_hal_cal_pclk_freq(lcd_hal_context_t *hal, uint32_t src_freq_hz, uint32_t expect_pclk_freq_hz, hal_utils_clk_div_t* lcd_clk_div); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c:624:11: error: too many arguments to function 'lcd_hal_cal_pclk_freq' 624 | = lcd_hal_cal_pclk_freq(&lcd.hal, 240000000, lcd.config.pixel_clock, flags, &clk_div); | ^~~~~~~~~~~~~~~~~~~~~ C:\Users\radgh\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/hal/include/hal/lcd_hal.h:47:10: note: declared here 47 | uint32_t lcd_hal_cal_pclk_freq(lcd_hal_context_t *hal, uint32_t src_freq_hz, uint32_t expect_pclk_freq_hz, hal_utils_clk_div_t* lcd_clk_div); | ^~~~~~~~~~~~~~~~~~~~~ exit status 1 Compilation error: exit status 1
Code:
#include <epdiy.h> #include <M5GFX.h> M5GFX display; //#include <M5UnitOLED.h> //M5UnitOLED display; // default setting //M5UnitOLED display ( 21, 22, 400000 ); // SDA, SCL, FREQ //#include <M5UnitLCD.h> //M5UnitLCD display; // default setting //M5UnitLCD display ( 21, 22, 400000 ); // SDA, SCL, FREQ //#include <M5UnitGLASS2.h> //M5UnitGLASS2 display; // default setting //M5UnitGLASS2 display ( 21, 22, 400000 ); // SDA, SCL, FREQ // #include <M5AtomDisplay.h> // M5AtomDisplay display; static constexpr size_t BAR_COUNT = 64; static int max_y[BAR_COUNT]; static int prev_y[BAR_COUNT]; static uint32_t colors[BAR_COUNT]; void setup(void) { display.init(); display.startWrite(); display.fillScreen(TFT_BLACK); if (display.isEPD()) { display.setEpdMode(epd_mode_t::epd_fastest); } if (display.width() < display.height()) { display.setRotation(display.getRotation() ^ 1); } for (int x = 0; x < BAR_COUNT; ++x) { prev_y[x] = display.height(); max_y[x] = display.height(); int r=0,g=0,b=0; switch (x >> 4) { case 0: b = 255; g = x*0x11; break; case 1: b = 255 - (x&15)*0x11; g = 255; break; case 2: g = 255; r = (x&15)*0x11; break; case 3: r = 255; g = 255 - (x&15)*0x11; break; } colors[x] = display.color888(r,g,b); } } void loop(void) { int h = display.height(); static int i; ++i; display.waitDisplay(); for (int x = 0; x < BAR_COUNT; ++x) { int y = (h>>1) - (sinf((float)((x-24)*i) / 3210.0f) + sinf((float)((x-40)*i) / 1234.0f)) * (h>>2); int xpos = x * display.width() / BAR_COUNT; int w = ((x+1) * display.width() / BAR_COUNT) - xpos - 1; if (max_y[x]+1 >= y) { max_y[x] = y-1; } else { if ((i & 3) ==0 ) { display.fillRect(xpos, max_y[x]-3, w, 1, TFT_BLACK); max_y[x]++; } } display.fillRect(xpos, max_y[x]-3, w, 3, TFT_WHITE); if (prev_y[x] < y) { display.fillRect(xpos, prev_y[x], w, y - prev_y[x], TFT_BLACK); } else { display.fillRect(xpos, y, w, prev_y[x] - y, colors[x]); } prev_y[x] = y; } display.display(); }
-
@felmue Downloaded the 2.0.0 version of EPDiy and tested it again. I got fewer errors this time. I apologize if this seems rudimentary to you all. I am trying my best.
Code remained the same. EPDiy updated to 2.0.0.
Error code:
c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c: In function 'epd_lcd_set_pixel_clock_MHz': c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c:614:78: error: passing argument 4 of 'lcd_hal_cal_pclk_freq' makes pointer from integer without a cast [-Wint-conversion] 614 | = lcd_hal_cal_pclk_freq(&lcd.hal, 240000000, lcd.config.pixel_clock, flags, &clk_div); | ^~~~~ | | | int In file included from c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c:41: C:\Users\radgh\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/hal/include/hal/lcd_hal.h:47:129: note: expected 'hal_utils_clk_div_t *' but argument is of type 'int' 47 | uint32_t lcd_hal_cal_pclk_freq(lcd_hal_context_t *hal, uint32_t src_freq_hz, uint32_t expect_pclk_freq_hz, hal_utils_clk_div_t* lcd_clk_div); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ c:\Users\radgh\Documents\Arduino\libraries\epdiy\src\output_lcd\lcd_driver.c:614:11: error: too many arguments to function 'lcd_hal_cal_pclk_freq' 614 | = lcd_hal_cal_pclk_freq(&lcd.hal, 240000000, lcd.config.pixel_clock, flags, &clk_div); | ^~~~~~~~~~~~~~~~~~~~~ C:\Users\radgh\AppData\Local\Arduino15\packages\esp32\tools\esp32-arduino-libs\idf-release_v5.4-2f7dcd86-v1\esp32s3/include/hal/include/hal/lcd_hal.h:47:10: note: declared here 47 | uint32_t lcd_hal_cal_pclk_freq(lcd_hal_context_t *hal, uint32_t src_freq_hz, uint32_t expect_pclk_freq_hz, hal_utils_clk_div_t* lcd_clk_div); | ^~~~~~~~~~~~~~~~~~~~~ exit status 1 Compilation error: exit status 1
-
@RadghKris said in NEED HELP: No screen, PaperS3 beeps and returns Serial monitor communication....:
flags
I went and deleted this argument/variable from the library. May not have been the best thing to do, but it worked! I got the bar graph to work!!
So, I have one program that will display the screen, and one program that will beep the buzzer and communicate with the serial monitor.
Progress. Still not perfect, but progress.