Open TotallyInformation opened 4 years ago
The Button2 issue was fixed by using the lewishxe version - the link in that repo points to the original which doesn't work.
Now, the remaining error is:
Build options changed, rebuilding all
C:\src\arduino\TTGO-T-Display\TTGO-T-Display.ino: In lambda function:
TTGO-T-Display:62:26: error: 'TFT_DISPOFF' was not declared in this scope
tft.writecommand(TFT_DISPOFF);
^
TTGO-T-Display:63:26: error: 'TFT_SLPIN' was not declared in this scope
tft.writecommand(TFT_SLPIN);
^
Multiple libraries were found for "WiFi.h"
Used: C:\Users\myuser\Documents\ArduinoData\packages\esp32\hardware\esp32\1.0.2\libraries\WiFi
Not used: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\libraries\WiFi
exit status 1
'TFT_DISPOFF' was not declared in this scope
OK, so I'm guessing that the reason it isn't working is that you have referenced a FORK of the actual library instead of the library itself. That fork is 96 commits behind the original!
Why on earth would you do that?
At least make it clear in the README that is what you have done.
Yes, the referenced TFT_eSPI is the branch that I modified after the fork. I should describe it clearly in the readme. Thank you for your reminder.
It would be a good idea to rebase from the original Bodmer repo. They have renamed the driver, so this patch works against the 1.4.11 release from that repo for the TTGO X Display. Although I'm not sure why it needs to be set as 240 width when it clearly isnt...
Edit: I forgot to mention, you now also need tft.setSwapBytes(true);
in the sketch (before tft.pushImage), and it also works for 1.4.13 which is available in PlatformIO
@lilphil/@lewisxhe why do we need another fork? Much better to update the original (it has now been updated and should work just fine) than confuse people with another fork that gets out-of-date.
Okay, I am super confused here and have been working on this for hours. Am I supposed to use the linked forks or the original? Neither work for me. The original just gives me errors and linked forks display nothing but the serial monitor shows me that it is working as expected. Also, why are there instructions about moving and modifying files. Shouldn't those details be taken care of in the fork? I don't know how I did it but I once had a display that read "Voltage :4.70" with a small rectangle next to it that seemed to be a shrunk down version of what it used to display on the entire screen what I first purchased it. Also, the pretty graphical TTGO display does not show. Help please.
Check this video on how to install it https://youtu.be/qj9dN-Ginxc
Works! Thanks.
The library used has been synchronized to the main branch
For others that might still be having problems with the screen: If it looks like only 1/3 of the screen is being used, be sure to comment out the default "#include
Just worked through the instructions making sure to follow the video and @spradlinb 's suggestion and the image displayed on the screen is half the TTGO image and half the multicolored screen. Here's an image of how it looks
Any thoughts?
UPDATE 2 Ignore the first update and refer to https://github.com/Xinyuan-LilyGO/TTGO-T-Display/issues/4#issuecomment-545962661
UPDATE
Edited the following lines in TTGO_T_Display.h
#define TFT_WIDTH 240 // original: 135
#define TFT_HEIGHT 320 // original: 240
Then in TTGO-T-Display.ino
#define TFT_WIDTH 240 // added
#define TFT_HEIGHT 320 // added
TFT_eSPI tft = TFT_eSPI(TFT_WIDTH, TFT_HEIGHT); // edited
This got the colors full screen.
The image in bmp.h
is too small for a 320x240 display, it's setup for a 135x240 display (32400 bytes).
In _https://github.com/Bodmer/TFT_eSPI/blob/master/User_Setup.h_ must ILI9341_DRIVER be commented out.
// Only define one driver, the other ones must be commented out
#define ILI9341_DRIVER
iCompiles and upload for me (I trashed the original WiFi library), but nothing on screen, the sketch doesn't even start, and I get this in the Serial monitor :
**Rebooting... ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff0018,len:4 load:0x3fff001c,len:956 load:0x40078000,len:0 load:0x40078000,len:13076 entry 0x40078a58 assertion "false && "item should have been present in cache"" failed: file "/Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/nvs_flash/src/nvs_item_hash_list.cpp", line 85, function: void nvs::HashList::erase(size_t) abort() was called at PC 0x400d8f3b on core 0
Backtrace: 0x400884bc:0x3ffcd750 0x400885bb:0x3ffcd770 0x400d8f3b:0x3ffcd790 0x400dd78c:0x3ffcd7c0 0x400dde42:0x3ffcd7e0 0x400de171:0x3ffcd830 0x400dd23c:0x3ffcd890 0x400dcd96:0x3ffcd8e0 0x400dce2f:0x3ffcd900 0x400dce7a:0x3ffcd920 0x400d4ca8:0x3ffcd940 0x4010ff47:0x3ffcd960 0x400da60a:0x3ffcd990
Rebooting...** and again and again
Actually, it looks similar to the heap problems I 've found on other forums that make the ESP crash in special WiFi cases, but in my case I don't even see the first print statement in setup().
Any idea what could be wrong ? I updated my ESP32 files to 1.0.4 but it doesn't change anything
Using the Arduino IDE I followed the instructions in the README but there are some issues:
- The Button2 library is not in the Arduino library manager, you have to download manually.
- Then the compile fails with the following errors:
C:\src\arduino\TTGO-T-Display\TTGO-T-Display.ino: In function 'void button_init()': TTGO-T-Display:50:30: error: no matching function for call to 'Button2::Button2()' pBtns = new Button2 [args]; ^ In file included from C:\src\arduino\TTGO-T-Display\TTGO-T-Display.ino:5:0: C:\src\arduino\libraries\LennartHennigs-Button2-4105e70\src/Button2.h:55:5: note: candidate: Button2::Button2(byte, byte, unsigned int) Button2(byte attachTo, byte buttonMode = INPUT_PULLUP, unsigned int debounceTimeout = DEBOUNCE_MS); ^ C:\src\arduino\libraries\LennartHennigs-Button2-4105e70\src/Button2.h:55:5: note: candidate expects 3 arguments, 0 provided C:\src\arduino\libraries\LennartHennigs-Button2-4105e70\src/Button2.h:29:7: note: candidate: constexpr Button2::Button2(const Button2&) class Button2 { ^ C:\src\arduino\libraries\LennartHennigs-Button2-4105e70\src/Button2.h:29:7: note: candidate expects 1 argument, 0 provided C:\src\arduino\libraries\LennartHennigs-Button2-4105e70\src/Button2.h:29:7: note: candidate: constexpr Button2::Button2(Button2&&) C:\src\arduino\libraries\LennartHennigs-Button2-4105e70\src/Button2.h:29:7: note: candidate expects 1 argument, 0 provided C:\src\arduino\TTGO-T-Display\TTGO-T-Display.ino: In lambda function: TTGO-T-Display:62:26: error: 'TFT_DISPOFF' was not declared in this scope tft.writecommand(TFT_DISPOFF); ^ TTGO-T-Display:63:26: error: 'TFT_SLPIN' was not declared in this scope tft.writecommand(TFT_SLPIN); ^ Multiple libraries were found for "WiFi.h" Used: C:\Users\myuser\Documents\ArduinoData\packages\esp32\hardware\esp32\1.0.2\libraries\WiFi Not used: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\libraries\WiFi exit status 1 no matching function for call to 'Button2::Button2()'
did you have any errors such this one
Compilation error: bmp.h: No such file or directory
if it is a library i can find it anywhere
Using the Arduino IDE I followed the instructions in the README but there are some issues: