Hi, I've been stuck on this for about 3 days and have come here for some help.
I have a LilyGO T8 ESP32 S3 and am using this Waveshare 3.7inch e-Paper e-Ink Display HAT. I am struggling with my EDP32 so I first installed the GxEPD2 library through Arduino's IDE but cannot get it to work. I have opened the helloworld sample (.ino file) but when I uncomment my display in GxEPD_display_new_style.h
Please post your sketch, using code tags when you do
Posting your code using code tags prevents parts of it being interpreted as HTML coding and makes it easier to copy for examination
In my experience the easiest way to tidy up the code and add the code tags is as follows
Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help.
I don't have the library installed so I don't have the example. Please post it here
It would also help if you posted the full error message copied from the IDE using the button provided for the purpose. Please post the error message in code tags
and here is the error message `/private/var/folders/b5/wdr56hts38dgcn8m04mhy3rr0000gn/T/.arduinoIDE-unsaved2024112-95408-n20cpu.g87rk/GxEPD2_HelloWorld/GxEPD2_HelloWorld.ino: In function 'void setup()':
/private/var/folders/b5/wdr56hts38dgcn8m04mhy3rr0000gn/T/.arduinoIDE-unsaved2024112-95408-n20cpu.g87rk/GxEPD2_HelloWorld/GxEPD2_HelloWorld.ino:48:3: error: 'display' was not declared in this scope
display.init(115200, true, 2, false); // USE THIS for Waveshare boards with "clever" reset circuit, 2ms reset pulse
^~~~~~~
/private/var/folders/b5/wdr56hts38dgcn8m04mhy3rr0000gn/T/.arduinoIDE-unsaved2024112-95408-n20cpu.g87rk/GxEPD2_HelloWorld/GxEPD2_HelloWorld.ino:48:3: note: suggested alternative: 'delay'
display.init(115200, true, 2, false); // USE THIS for Waveshare boards with "clever" reset circuit, 2ms reset pulse
^~~~~~~
delay
/private/var/folders/b5/wdr56hts38dgcn8m04mhy3rr0000gn/T/.arduinoIDE-unsaved2024112-95408-n20cpu.g87rk/GxEPD2_HelloWorld/GxEPD2_HelloWorld.ino: In function 'void helloWorld()':
/private/var/folders/b5/wdr56hts38dgcn8m04mhy3rr0000gn/T/.arduinoIDE-unsaved2024112-95408-n20cpu.g87rk/GxEPD2_HelloWorld/GxEPD2_HelloWorld.ino:57:3: error: 'display' was not declared in this scope
display.setRotation(1);
^~~~~~~
/private/var/folders/b5/wdr56hts38dgcn8m04mhy3rr0000gn/T/.arduinoIDE-unsaved2024112-95408-n20cpu.g87rk/GxEPD2_HelloWorld/GxEPD2_HelloWorld.ino:57:3: note: suggested alternative: 'delay'
display.setRotation(1);
^~~~~~~
delay
exit status 1
Compilation error: 'display' was not declared in this scope`
yes, i have done this but nothing displays on the screen; it compiles and uploads with no error.
however when I use ..._new_style.h I get the display error
For compilation related issues I need to know which board you select to compile for in the Arduino IDE. And I also need to know the version of GxEPD2 you use.
Please report the line you uncommented, in a code window, to check.
For this issue I also need to know which board you select to compile for.
And you could tell which line you uncommented, for check.
For execution related issues, please report diagnostic output from Serial Monitor, in a code window, please.
-jz-
Hi. I am using GxEPD2 and an ArduinoRev2 Uno WiFi. That is what I selected.
In new style I uncommented //#define GxEPD2_DRIVER_CLASS GxEPD2_370_TC1 // ED037TC1 280x480, SSD1677, (ICA-FU-20 ichia 2029), Waveshare 3.7"
and in the old style GxEPD2_display_section.h I uncommented //GxEPD2_BW<GxEPD2_370_TC1, MAX_HEIGHT(GxEPD2_370_TC1)> display(GxEPD2_370_TC1(/*CS=10*/ SS, /*DC=*/ 9, /*RST=*/ 8, /*BUSY=*/ 7)); // ED037TC1 280x480, SSD1677, Waveshare 3.7"
Hello, for some reason I can’t get in my primary account. I am using an Uno Rev2 Wi-Fi to connect to the screen, not a LilyGO. I apologise.
In the IDE it says "Arduino UNO WiFi Rev2", which is what I use to compile. For the new style I am using line 62. And 663 for the old style. I am not using both display selection files at the same time but have tried both
And you may need to adapt pin parameters.
pins_arduino.h for this board confuses me, and I don't have time to study it. But:
C:\Users\xxx\AppData\Local\Arduino15\packages\arduino\hardware\megaavr\1.8.8\variants\uno2018\pins_arduino.h
has
Thanks, after some look it appears I need to use the ICSP pins for my specific board. I'll see how it goes and will get back. Thanks for your time thus far.
But GxEPD2 uses HW SPI, per default the global SPIClass instance SPI by Arduino IDE.
The SPIClass "knows" the pin numbers, taken from pin_arduino.h.
For CS you can use any pin you like, or the default SS pin 22.
-jz-