Xinyuan-LilyGO / LilyGo-T-RGB

MIT License
82 stars 26 forks source link

Unable to program #8

Closed user0693 closed 8 months ago

user0693 commented 1 year ago

Hey,

I've been following all the steps and reading all the documents and instructions, but nothing works. Every time I try and run it I get errors in Arduino IDE. Now my ESP32-S3 won't even turn on.

mmMicky commented 1 year ago

Did it fail to compile? Or is there a problem when uploading?

gustavoportilla85 commented 1 year ago

I have the same problems in uploading with Arduino IDE, it does not compile any program

ihayri commented 1 year ago

Try the "display" example that should get you started, that is my base code I am using and have added jpeg image viewer, touch gestures to put it to deep sleep and touch interrupt pin to wake it up again, since the board has no power switch. Also make sure you use the you only use the Arduino_GFX, lvgl, TouchLib libraries that it comes with, other versions do not work, and copy the lv_config.h file in the lvgl library folder. Also do not updae the libraries or it will break it again.

PlastiBots commented 1 year ago

You can also try the touch swipe sample I provided in the library here. It doesn't use LVGL and you can install the Arduino GFX library from GIT rather than the one modified from here. It should get you up and running.

euphi commented 1 year ago

I created a library for easier use here https://github.com/fablabnbg/TRGBArduinoSupport .

It supports platformio and is not yet integrated into Arduino IDE. However, if you want to give platformio a try (it integrates well into Visual Studio Code or Eclipse CDT), this can be a nice library :-)

gustavoportilla85 commented 1 year ago

Error: VCS: Could not process command ['git', 'clone', '--recursive', '--depth', '1', 'git@github.com:fablabnbg/TRGBArduinoSupport.git'

willba4 commented 1 year ago

i'm also unable to compile any of the examples. i've installed the extra couple of libraries that are included in the official github page.

mmMicky commented 1 year ago

i'm also unable to compile any of the examples. i've installed the extra couple of libraries that are included in the official github page.

You need to try to compile the simplest blink example first to prove that your environment is fully built.

Revoxdyna commented 1 year ago

Try the "display" example that should get you started, that is my base code I am using and have added jpeg image viewer, touch gestures to put it to deep sleep and touch interrupt pin to wake it up again, since the board has no power switch. Also make sure you use the you only use the Arduino_GFX, lvgl, TouchLib libraries that it comes with, other versions do not work, and copy the lv_config.h file in the lvgl library folder. Also do not updae the libraries or it will break it again.

Could you share the "lvgl" libraries here? I am using arduino IDE 2.0.3. It does not come with the libraries of Arduino_GFX, lvgl, TouchLib . After download those libraries and followed the setup instructions for lv_conf.h, I still can not compile the example of "factory". It showed the following error msg and obviously the factory_ui.cpp have some problems, especially the function of lv_msg_subsribe_obj (error: 'lv_msg_subsribe_obj' was not declared in this scope)

C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp: In function 'void ui_begin()':
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp:47:3: error: 'lv_msg_subsribe_obj' was not declared in this scope
   lv_msg_subsribe_obj(MSG_BAT_VOLT_UPDATE, bat_label, NULL);
   ^~~~~~~~~~~~~~~~~~~
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp:47:3: note: suggested alternative: 'lv_img_set_size_mode'
   lv_msg_subsribe_obj(MSG_BAT_VOLT_UPDATE, bat_label, NULL);
   ^~~~~~~~~~~~~~~~~~~
   lv_img_set_size_mode
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp: In lambda function:
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp:52:9: error: 'lv_msg_t' was not declared in this scope
         lv_msg_t *m = lv_event_get_msg(e);
         ^~~~~~~~
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp:52:9: note: suggested alternative: 'lv_img_t'
         lv_msg_t *m = lv_event_get_msg(e);
         ^~~~~~~~
         lv_img_t
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp:52:19: error: 'm' was not declared in this scope
         lv_msg_t *m = lv_event_get_msg(e);
                   ^
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp:52:19: note: suggested alternative: 'tm'
         lv_msg_t *m = lv_event_get_msg(e);
                   ^
                   tm
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp:52:23: error: 'lv_event_get_msg' was not declared in this scope
         lv_msg_t *m = lv_event_get_msg(e);
                       ^~~~~~~~~~~~~~~~
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp:52:23: note: suggested alternative: 'lv_event_get_key'
         lv_msg_t *m = lv_event_get_msg(e);
                       ^~~~~~~~~~~~~~~~
                       lv_event_get_key
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp:53:41: error: 'lv_msg_get_payload' was not declared in this scope
         const float *v = (const float *)lv_msg_get_payload(m);
                                         ^~~~~~~~~~~~~~~~~~
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp:53:41: note: suggested alternative: 'lv_img_get_pivot'
         const float *v = (const float *)lv_msg_get_payload(m);
                                         ^~~~~~~~~~~~~~~~~~
                                         lv_img_get_pivot
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp: In function 'void ui_begin()':
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp:56:7: error: 'LV_EVENT_MSG_RECEIVED' was not declared in this scope
       LV_EVENT_MSG_RECEIVED, NULL);
       ^~~~~~~~~~~~~~~~~~~~~
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp:56:7: note: suggested alternative: 'LV_EVENT_RELEASED'
       LV_EVENT_MSG_RECEIVED, NULL);
       ^~~~~~~~~~~~~~~~~~~~~
       LV_EVENT_RELEASED
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp: In lambda function:
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp:65:9: error: 'lv_msg_t' was not declared in this scope
         lv_msg_t *m = lv_event_get_msg(e);
         ^~~~~~~~
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp:65:9: note: suggested alternative: 'lv_img_t'
         lv_msg_t *m = lv_event_get_msg(e);
         ^~~~~~~~
         lv_img_t
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp:65:19: error: 'm' was not declared in this scope
         lv_msg_t *m = lv_event_get_msg(e);
                   ^
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp:65:19: note: suggested alternative: 'tm'
         lv_msg_t *m = lv_event_get_msg(e);
                   ^
                   tm
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp:65:23: error: 'lv_event_get_msg' was not declared in this scope
         lv_msg_t *m = lv_event_get_msg(e);
                       ^~~~~~~~~~~~~~~~
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp:65:23: note: suggested alternative: 'lv_event_get_key'
         lv_msg_t *m = lv_event_get_msg(e);
                       ^~~~~~~~~~~~~~~~
                       lv_event_get_key
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp:66:57: error: 'lv_msg_get_payload' was not declared in this scope
         const touch_point_t *v = (const touch_point_t *)lv_msg_get_payload(m);
                                                         ^~~~~~~~~~~~~~~~~~
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp:66:57: note: suggested alternative: 'lv_img_get_pivot'
         const touch_point_t *v = (const touch_point_t *)lv_msg_get_payload(m);
                                                         ^~~~~~~~~~~~~~~~~~
                                                         lv_img_get_pivot
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp: In lambda function:
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp:93:9: error: 'lv_msg_t' was not declared in this scope
         lv_msg_t *m = lv_event_get_msg(e);
         ^~~~~~~~
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp:93:9: note: suggested alternative: 'lv_img_t'
         lv_msg_t *m = lv_event_get_msg(e);
         ^~~~~~~~
         lv_img_t
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp:93:19: error: 'm' was not declared in this scope
         lv_msg_t *m = lv_event_get_msg(e);
                   ^
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp:93:19: note: suggested alternative: 'tm'
         lv_msg_t *m = lv_event_get_msg(e);
                   ^
                   tm
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp:93:23: error: 'lv_event_get_msg' was not declared in this scope
         lv_msg_t *m = lv_event_get_msg(e);
                       ^~~~~~~~~~~~~~~~
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp:93:23: note: suggested alternative: 'lv_event_get_key'
         lv_msg_t *m = lv_event_get_msg(e);
                       ^~~~~~~~~~~~~~~~
                       lv_event_get_key
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp:94:39: error: 'lv_msg_get_payload' was not declared in this scope
         const char *v = (const char *)lv_msg_get_payload(m);
                                       ^~~~~~~~~~~~~~~~~~
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory_ui.cpp:94:39: note: suggested alternative: 'lv_img_get_pivot'
         const char *v = (const char *)lv_msg_get_payload(m);
                                       ^~~~~~~~~~~~~~~~~~
                                       lv_img_get_pivot
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory.ino:79:1: error: 'TouchLib' does not name a type; did you mean 'TouchLib_h'?
 TouchLib touch(Wire, IIC_SDA_PIN, IIC_SCL_PIN, CTS820_SLAVE_ADDRESS);
 ^~~~~~~~
 TouchLib_h
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory.ino: In function 'void lv_touchpad_read(lv_indev_drv_t*, lv_indev_data_t*)':
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory.ino:146:8: error: 'touch' was not declared in this scope
     if(touch.read()){
        ^~~~~
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory.ino:148:5: error: 'TP_Point' was not declared in this scope
     TP_Point t = touch.getPoint(0);
     ^~~~~~~~
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory.ino:148:5: note: suggested alternative: 'Print'
     TP_Point t = touch.getPoint(0);
     ^~~~~~~~
     Print
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory.ino:149:27: error: 't' was not declared in this scope
     data->point.x = p.x = t.x;
                           ^
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory.ino:157:3: error: 'lv_msg_send' was not declared in this scope
   lv_msg_send(MSG_TOUCH_UPDATE, &p);
   ^~~~~~~~~~~
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory.ino:157:3: note: suggested alternative: 'lv_fs_seek'
   lv_msg_send(MSG_TOUCH_UPDATE, &p);
   ^~~~~~~~~~~
   lv_fs_seek
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory.ino: In function 'void setup()':
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory.ino:188:3: error: 'touch' was not declared in this scope
   touch.init();
   ^~~~~
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory.ino: In function 'void loop()':
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory.ino:296:5: error: 'lv_msg_send' was not declared in this scope
     lv_msg_send(MSG_BAT_VOLT_UPDATE, &v);
     ^~~~~~~~~~~
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory.ino:296:5: note: suggested alternative: 'lv_fs_seek'
     lv_msg_send(MSG_BAT_VOLT_UPDATE, &v);
     ^~~~~~~~~~~
     lv_fs_seek
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory.ino: In function 'void wifi_task(void*)':
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory.ino:400:3: error: 'lv_msg_send' was not declared in this scope
   lv_msg_send(MSG_WIFI_UPDATE, str.c_str());
   ^~~~~~~~~~~
C:\Users\USER\Desktop\LCD_2inch1_lillygo\T-RGB-main\example\factory\factory.ino:400:3: note: suggested alternative: 'lv_fs_seek'
   lv_msg_send(MSG_WIFI_UPDATE, str.c_str());
   ^~~~~~~~~~~
   lv_fs_seek
Multiple libraries were found for "Wire.h"
  Used: C:\Users\USER\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.6\libraries\Wire
  Not used: C:\Users\USER\Documents\Arduino\libraries\Wire
exit status 1

Compilation error: 'lv_msg_subsribe_obj' was not declared in this scope
furynick commented 1 year ago

Same problem here, display example compiles and run without issue but factory example fails with "not declared" errors :

D:\Arduino\T-RGB-main\examples\factory\factory.ino: In function 'void lv_touchpad_read(lv_indev_drv_t*, lv_indev_data_t*)':
D:\Arduino\T-RGB-main\examples\factory\factory.ino:260:5: error: 'lv_msg_send' was not declared in this scope
     lv_msg_send(MSG_TOUCH_UPDATE, &p);
     ^~~~~~~~~~~

Using HTTPClient version 2.0.0 Using WiFi version 2.0.0 Using WiFiClientSecure version 2.0.0 Using SD_MMC version 2.0.0 Using FS version 2.0.0 Using Wire version 2.0.0 Using lvgl version 8.3.10 Using OneButton version 2.1.0 Arduino 2.2.1

github-actions[bot] commented 8 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 8 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.