sukesh-ak / ESP32-TUX

ESP32-TUX - ESP32 / ESP32-XX Touch UX Template using LVGL to get you started
https://tux.sukesh.me
MIT License
225 stars 55 forks source link

Difference between Arduino & ESP-IDF #19

Closed mess-maker closed 1 year ago

mess-maker commented 1 year ago

Hi, do you plan to make template like this one with arduino framework ?

Graphics & Touch Driver : LovyanGFX UI / Widgets : LVGL 8.x Framework : arduino

just received my new WT32-SC01 Plus, and don't know how to get started for now as I prefer to stick to arduino framework for now

sukesh-ak commented 1 year ago

@mess-maker Congrats. I hope you got the debug board as well. Link is in the project readme. This will help ease some issues with flashing.

This project was a base template I created for one of my commercial requirements. Due to Arduino license restrictions, I used ESP-IDF for it.

ESP-IDF in C++ is same as Arduino.


/* ESP-IDF code for Arduino */

// Your arduino code
void setup() {

}

void loop() {

}

// The following portion (almost same) is merged when you compile Arduino, that's all.
// This is part of one of the files in the Arduino installed folder
extern "C" void app_main(void) {

    setup();  // Your Arduino setup function
    while (1) {
        loop();  // Your Arduino loop function
    }
}
mess-maker commented 1 year ago

thanks I'll try to get started with that

knopserl commented 1 year ago

this is a great project for the WT32-SC01 Plus, many thanks for shaing this! But I also wanted to use it in the Arduino IDE. It it feasible and worth to spent the effort to migrate this ESP-IDF based code to an Arduino IDE acceppted code? I have tried to insert the main.cpp code in the "voide setup() function and an empto loop function (as I have not seen a matching or required loop code) and it does of course not compile because it does not even accept the include files such as #include ? Any help possible or to much to change?