• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

2.5 Basic Slider

Q&A Forum › Category: ESP32 › 2.5 Basic Slider
0 Vote Up Vote Down
Jacques Boissieux asked 1 week ago

Hello,
I’m using Arduino with an ESP32 Wroom2 ,ang the 2.5 Basic Slider.ino Works fine.
Sometimes I try to use Platformio using sketches written for Arduino. I’m currently trying to get the 2.5 Basic Slider from the LVGL course to work, and I can’t seem to resolve the problem. The main cause is the confusion created by Espressif by introducing a version 3. Attempts with PWN have been unsuccessful.
Does anyone have a simple modification to this program to make it work under Platformio?
I’m an older hobbyist, and I’m having a bit of trouble understanding the long explanations.

5 Answers
0 Vote Up Vote Down
Jacques Boissieux answered 1 week ago

Hello
finally i just change  in static vois dlider_event_callback(lv_event_t *e)

 

ledcWrite(CYD_LED_BLUE, map((int)lv_slider_get_value(slider), 0, 100, 255, 0));
with 

ledcWrite(0, map((int)lv_slider_get_value(slider), 0, 100, 255, 0));
 

0 Vote Up Vote Down
Jacques Boissieux answered 1 week ago

Hello
finally i just change  in static vois dlider_event_callback(lv_event_t *e)


ledcWrite(CYD_LED_BLUE, map((int)lv_slider_get_value(slider), 0, 100, 255, 0));
with

ledcWrite(0, map((int)lv_slider_get_value(slider), 0, 100, 255, 0));

 

All is working fine now

0 Vote Up Vote Down
Sara Santos Staff answered 1 week ago

Hi.
Great. I’m glad everything is working now.
 
Just to make things clear:
When using platformIO, it will use the older version of the ESP32 core, version 2.
From version 2 to version 3, the way PWM is controlled is different.
In our codes, we’re now using version 3.
 
plaformIO doesn’t support version 3 of the ESP32 core. For that, you have to use pioarduino:https://randomnerdtutorials.com/vs-code-pioarduino-ide-esp32/
 
However, we have received mixed feedback from using pioarduino. While some say it works as expected without any issues, others have reported mixing conflicting versions and issues with unexpected errors related to the installation. Some people still prefer to use the older version of VS Code.
 
This issue doesn’t happen with Arduino IDE.
 
Regards,
Sara

0 Vote Up Vote Down
Jacques Boissieux answered 1 week ago

thanks Sara,
May be I cab try to use Espressif IDF as explain in you site..
best Regards
Jacques B
 
 

0 Vote Up Vote Down
Sara Santos Staff answered 1 week ago

I’ll mark this issue as resolved now. If you need further help, you just need to open a new question in our forum.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Smart Home with Raspberry Pi, ESP32, and ESP8266 V1.6 September 9, 2025
  • [eBook Updated] Learn LVGL: Build GUIs for ESP32 Projects – Version 1.5 July 7, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.