Notifications
Clear all

Problems with LilyGo e-paper

36 Posts
4 Users
1 Likes
798 Views
Christine86
(@christine86)
Member
Joined: 4 years ago
Posts: 45
Topic starter  

Goddess, I hope someone here can help me.

I saw @dronebot-workshop presentations on e-paper, sensors(particularly the BME680) and LORA & I immediately thought about an internal & external weather station.

So I went out and bought a Lilygo T5 4.7 Inch E-paper. When it arrived, I downloaded the examples that Lilygo provided, but have been unable to make it work.

I'm not sure whether the fault is that I'm using an "M1 iMac", or whether it's a problem with the Arduino IDE (v2.2.1), or the embedded ESP32 on the Lilygo board (hard to read, but I think it's a Wrover module. I've hooked it up, & it seems to be working. The board is "esp32 Wrover Module" the USB is "dev/cu.usbserial-0242f6ca" & the board info seems to be OK too.

But EVERY sketch provided by Lilygo (at LilyGo-EPD47 on Github) https://github.com/Xinyuan-LilyGO/LilyGo-EPD47/tree/esp32s3 ,refuses to compile, for instance the "Button" demo gives an error;

In file included from /Users/christine/Documents/Arduino/libraries/LilyGoEPD47/src/ed047tc1.c:6:
/Users/christine/Documents/Arduino/libraries/LilyGoEPD47/src/ed047tc1.h:114:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'epd_output_row'
114 | void IRAM_ATTR epd_output_row(uint32_t output_time_dus);

and /Users/christine/Documents/Arduino/libraries/LilyGoEPD47/src/ed047tc1.c:58:5: note: each undeclared identifier is reported only once for each function it appears in
/Users/christine/Documents/Arduino/libraries/LilyGoEPD47/src/ed047tc1.c: In function 'fast_gpio_set_lo':
/Users/christine/Documents/Arduino/libraries/LilyGoEPD47/src/ed047tc1.c:63:5: error: 'GPIO' undeclared (first use in this function)
63 | GPIO.out_w1tc = (1 << gpio_num);

& every example has similar errors.

I worry that if I can't even get the examples to run, I stand zero chance of writing a sketch of my own.

Hope someone can help, as I've been at this for hours over the last week!!!

Christine


   
Quote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6981
 

@christine86 Hi Christine, I, too, use an M1 Mac. I just installed the library using the zip file I downloaded using your link. I then changed the PSRAM and selected the 1st board in the esp32 list, which is an esp32 s3. See pics. However, I can't test it, BUT your serial port looks weird. Notice what mine says, 2nd line down in 1st big pic.

I also want to make sure you understood the OR in the instructions. You do NOT need to do the git step, just a normal IDE/Sketch/Include Library/Add .ZIP Library... see the last pic.

SUMMARY: the serial port looks weird; close the IDE (check the taskbar at the bottom; there should be no copy of it there)

ASSUMPTIONS: You installed the correct serial driver.

 

Screenshot 2024 01 14 at 08.41.29
Screenshot 2024 01 14 at 08.45.21
Screenshot 2024 01 14 at 08.44.49
Screenshot 2024 01 14 at 08.50.58

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6981
 

@christine86 I had a look at your history and see your last entry for your first esp32 misadventure.

Now I'm just puzzled as to why this didn't work prior to my getting the new cable? I didn't need this for my Arduino board, but apparently the ESP32 board required a direct connection to the USB type C port.

My M1 Mac ONLY has 2 USB-C ports so I am wondering what you meant by the above.

Is it possible you had a power only cable?

HOWEVER, since you have a compile time issue now, the cable and port etc have no influence. I now am moving incorrect library install to the top of the suspect list.

Here is what you should have in terms of dir structure.

Screenshot 2024 01 14 at 09.07.31

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Christine86
(@christine86)
Member
Joined: 4 years ago
Posts: 45
Topic starter  

Hi, I have to confess, this is the first esp32 project I've worked with.

When you say you changed the PSRAM, how do I do this? You also mentioned that my USB serial port looks weird? I have a USB-A to USB-C cable plugged into the Lilygo board hanging off a ORICO USB-A hub, which when I select "Get Board info" it seems to give a logical rejoinder?

I used Sketch->Library->Add .zip file & linked to the Lilygo library file downloaded from GitHub.

One puzzling thing, is that you say to select the esp s3 dev module, but shouldn't I select the esp module on the Lilygo board (it's hard to read, but I think it is a ESP32-S3-WROOM module)?

Sorry, if any of this is stupidity on my part, but as I said, this is my first attempted esp32 project, as up till now, I've only used Arduino boards.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6981
 

@christine86 Let's just focus on the first error in detail.

From your original post

/Users/christine/Documents/Arduino/libraries/LilyGoEPD47/src/ed047tc1.c:6:
/Users/christine/Documents/Arduino/libraries/LilyGoEPD47/src/ed047tc1.h:114:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'epd_output_row'
114 | void IRAM_ATTR epd_output_row(uint32_t output_time_dus);

The source statement is 

void IRAM_ATTR epd_output_row(uint32_t output_time_dus);

I know that the IRAM_ATTR which is the part "expected .... before 'epd_output_row'" is a MACRO. Where that macro comes from I am unsure but I will raise my bet now to this is your bug.

Just a long shot, here is a picture of what my Tools tab looks like, compare it line by line to yours and report back any differences.

Screenshot 2024 01 14 at 09.38.02

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6981
 

@christine86 

First take a screen grab of your Tools/Board info, use Cmd-Shift-4 to use the screen grab select tool. Here is what mine looks like.

Screenshot 2024 01 14 at 09.57.35
Screenshot 2024 01 14 at 09.58.03

 

If ANYTHING is different, that may be the problem.

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6981
 

@christine86 Once you select the right board, then the PSRAM option will show up in the Tools drop down menu. Just find PSRAM near the bottom, then select OPI, see pic. I am also enclosing several pics of how to select the right board. NOTE: I use the old way IDE/Tools/Board: method.

Screenshot 2024 01 14 at 10.07.52
Screenshot 2024 01 14 at 10.10.31
Screenshot 2024 01 14 at 10.11.09
Screenshot 2024 01 14 at 10.10.54

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@dronebot-workshop)
Workshop Guru Admin
Joined: 5 years ago
Posts: 1084
 

Posted by: @christine86

I'm not sure whether the fault is that I'm using an "M1 iMac", or whether it's a problem with the Arduino IDE (v2.2.1)

  Well, I just tried an "experiment" and got some interesting results.

I downloaded the LilyGo library from GitHub that you linked to and ran it on a Windows 11 workstation with the latest Arduino IDE. I set my board up as an ESP32 Dev Module, and I enabled PSRAM. It compiled, but gave warnings about the syntax of one of the calls to the display module.

I then tried the same experiment on an M1 Mac Mini, This time it fails to compile, the error is "i2s databus" section of the library not finding a file.

Obviously I don't have the correct ESP32 board selected on either machine, however I have the SAME one selected and would expect similar results. So I'm puzzled why the M1 Mac wouldn't compile, but the Windows 11 one would. 

So, to add to the mystery, I repeated the same experiment on a Linux (Ubuntu 23.10) workstation. It compiled perfectly, without any error messages.

So if you have the ability, try it out on Linux, as it seems to work for me.

😎

Bill

 

 

 

"Never trust a computer you can’t throw out a window." — Steve Wozniak


   
ReplyQuote
Christine86
(@christine86)
Member
Joined: 4 years ago
Posts: 45
Topic starter  

@dronebot-workshop Thank you Bill,

I'm confused with all this.

I have the latest Parallels, for times when I need Windows 11, so I will try that first.

Not familiar with Linux, though I think Parallels can run 2 or 3 versions. I'll try Ubuntu if Windows 11 does what you have reported. I've just been running a 10G fibre backbone (with Mikrotic switches, so haven't been able to do anything until now). THANK YOU for telling me the program won't compile on your M1 Mac Mini, I thought that the other person who responded to my post was justifiably angry (by private message) at my failure to follow his instructions.

I will try both Windows 11 and Ubuntu on Parallels set-up & see what happens.

Thanks for your help Bill,

Christine


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6981
 

@dronebot-workshop If you look back a few posts Bill you will see I got it to compile first try on my M1 Mac. What board did you specify?

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6981
 

@dronebot-workshop OOPS, sorry Bill, I just saw that you did specify the same board and PSRAM as me. Now you and I have the same setup with different results! 

What is the FIRST error, when I looked at it before it was caused by the IRAM_ATTR macro which I THOUGHT meant wrong board selected, but now I have no clue since you and I have identical setups.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6981
 

@dronebot-workshop I was just trying to do a test re esp32 boards and discovered something. When I remove all my board manager URL's except for the only one referring to esp32 which is the arduino_esp32 I still get a clean compile. My entire boards entry is now

https://espressif.github.io/arduino-esp32/package_esp32_index.json

HOWEVER when I pull down Tools/Boards, they are ALL still there. I then checked the folders and esp32 is at ver 2.0.14 while the arduino/esp32 is at 2.0.13.

Try rolling back the esp32 board version to 2.0.13 and see if that helps. On the Mac.

I am off to add in the nerds esp32 path and try again.

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6981
 

@dronebot-workshop I have done everything I can think of to 'break' the LilyGo scenario. I physically deleted ALL my boards folders except for espressif esp32. I tried ver 2.0.13 and 2.0.14.

If I knew where the macro IRAM_ATTR was stored, maybe then I could figure this out but I have no clue how to find it. 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6981
 

@dronebot-workshop Sorry for the delay, I had to make our coffee. I found where the IRAM_ATTR macro is defined. It is defined for each board family. The path is quite long so I will break it up. I can't imagine what would cause this, but if they are missing, a reinstall of boards might fix it, otherwise it may be some weird 'path' issue. I am also attempting to put the actual path here. As a test, a sketch (blink will do) and add void IRAM_ATTR some_func(uint32_t output_time); NOPE, it does produce an error, but of a totally different kind. I would delete and re-download the LillyGo git zip. If that still fails, then it looks like it may be some sort of charset issue, but the best course of action is to reduce the problem to as small a sketch as possible, then drill down on the error to discover the true underlying issue.

Sorry, although my heart is back to normal this morning, I am still weak and not up to the task of creating the test sketch. Maybe later today if someone doesn't beat me to it.

~/Library/Arduino15/packages/esp32/hardware/esp32/2.0.14/tools/sdk/esp32s3/include/esp_common/include/esp_attr.h

 

Screenshot 2024 01 16 at 11.03.28
Screenshot 2024 01 16 at 11.03.53
Screenshot 2024 01 16 at 11.02.38

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6981
 

@dronebot-workshop Durn, my eyes are letting me down. I agree, that no matter what you should get the same result on all 3 platforms. What I didn't catch earlier is you used ESP32Dev, NOT ESP32S3Dev. Does that make a difference?

I assume your  "i2s databus"  is the first error so since Christine had her first error at the IRAM_ATTR statement something really makes no sense. Additionally, I get a clean compile with similar hardware see pic. Since we seem to have the same platform, the same library code but 3 different results.

Since @christine86 will take the pragmatic approach in order to meet her schedules, if you Bill

@dronebot-workshop could send me the entire compile log (everything, not just the error lines) from the Mac Mini I will undertake to compare that to my output to see what the heck any difference may be.
I assume the LillyGo library was re-downloaded in case of a file transfer glitch (I have encountered one of those) and all parts (IDE, Libraries, Boards) are current.
 
Screenshot 2024 01 16 at 11.33.15

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Page 1 / 3