Getting Started with ESP32-S2, PlatformIO, and Arduino Framework
HTML-код
- Опубликовано: 15 июл 2024
- In this ESP32-S2 video tutorial, you're going to learn how to build a simple project based on Arduino Framework using ESP32-S2-Saola-1 Development Board, Visual Studio Code, and PlatformIO by programming the built-in LED diode to blink and change the color of the light. It's one of the simplest and quickest ways to get started with this microcontroller.
👍 Subscribe for more IoT and programming tutorials like this: / @tomasztarnowski4434
USB OTG wiki:
en.wikipedia.org/wiki/USB_On-...
USB Devices ESP32-S2 can possibly imitate:
en.wikipedia.org/wiki/USB#Dev...
Library to build USB Devices on ESP32-S2:
docs.tinyusb.org/en/latest/re...
CP210x USB to UART Driver:
www.silabs.com/developers/usb...
Getting Started with ESP32 - Step-By-Step Tutorial (previous ESP32 video):
• Getting Started with E...
ESP32-S2 Specification:
www.espressif.com/sites/defau...
ESP32-S2-Saola-1 Development Board Specification:
docs.espressif.com/projects/e...
Software used in the video:
Visual Studio Code IDE: code.visualstudio.com/
PlatformIO Extension: platformio.org/platformio-ide
Clang-Format Extensions (Code Formatter): marketplace.visualstudio.com/...
Link to the code: github.com/ttarnowski/get-sta...
Social Media:
Twitter: / t_tarnowski
Linkedin: / tomasz-ta...
GitHub: github.com/ttarnowski
Thank you for watching and see you soon!
00:00 Intro
00:31 To-Do List
01:17 ESP32-S2 vs ESP32 - main differences
03:26 ESP32-S2-Saola-1 Development Board
04:57 Creating a new project with VSCode and PlatformIO
06:30 Workaround to use Arduino Framework with Saola-1 board
07:36 Setting the monitor speed and initializing the Serial
08:05 Simple “Hello” program to send text over Serial
09:28 Preparing the board and deploying the code
10:26 Connecting to Serial Monitor and testing the program
11:31 Program to blink LED Diode: external library installation
13:15 Program to blink LED Diode: writing the code
16:25 Deploying the code and final test
17:17 The End - Наука
although there are many videos related to electronics, iot, makers etc...only few are providing such structured and clear content. Keep up with the good work! I'm looking forward to more advanced content on ESP32 and PIO development! You have one more subscriber, thanks!
Thank you for subscribing, Erich. I'm glad you're enjoying my content :)
Dude thank you so much. I have been trying to figure out for over an hour how to use the Arduino framework with the ESP32-S2 series, and you just explained EVERYTHING! I managed to transfer my code without any issues, thanks so much!
Great to hear that my video helped you, Nick :)
Clear and very well organized! Thank you VERY much. I was struggling with programming the Saola in the Arduino IDE until I found your video using VSCode. I'm hooked!
Superb job!! Now I know how to program the onboard RGB LED on my Saola 1 dev board. I always learn something new when I watch your videos.
Thank you, Paul. I'm glad my videos are helpful 👍
I just found this channel and *LOVE* the videos!
Thank You!
This was excellent. I just picked up an ESP32-S2-DevKitC-1 and I'm certain that this will get me started in no time.
Thanks!
Hi! did you manage to use ESP32-S2-DevKitC-1 with platformio? i have troubles because that board doesnt seem to be included
👍👍👍 ! Very good tutorial !
Just the right tempo for a newbee like me :-)
I like when you keep commenting all actions, how and why,
even if we are supposed to know it already.
Cheers,
Eddy.
Thank you, Eddy! Yeah, I'm trying to make these tutorials as easy as possible to build a good foundation before I jump to more complex projects :)
Your video halped a whole lot! Thank you! I hope you continue making good videos like this one!
great video, thanks for posting it here! amazing job
Glad you enjoyed it, Marcos!
Thank you!
You're welcome, Aleksandr :)
Thanks!
newbee here....i'm trying to use two esp32. one stationary with a piezo buzzer, the other to trigger the buzzer when it is close to the stationary one, you teach a a rate that is comfortable for newbee's. awesome videos!!!!1 thanks
Thank you!
You can also use the R32 and R33 and solder bridge them, and then you can plug the USB and use the OTG as normal.
Nice video :) thanks.
Thanks, Rixtronix LAB!
tthanks!!
Great video. Thanks for sharing. Is there a development board that comes with USB-C instead of Micro-USB, that you can recommend?
HI Tomasz : Good Tutorial . Would be nice if can have RS485 and later I3C protocol on esp32doit-devkit-v1
I was just working earlier trying to get my serial monitor to work. After watching this I see what I was doing wrong.
If there is a better way to monitor variable values than printing them to the serial monitor this would be my request for a video. It would be amazing if you could add a break point and hover over a variable to see it value but I doubt this can be done when programming a microcontroller.
Hey David, I'm happy my video helped you to solve the issue with the serial. Speaking about monitoring the variables except for printing out the values there 2 possible options I can think of:
- the first is setting up the debugger however that requires an additional hardware component - a JTAG probe, here you can find more info: docs.platformio.org/en/latest/tutorials/espressif32/arduino_debugging_unit_testing.html#debugging-the-firmware
- second option is to unit test your code natively (on your own computer) so you'll get faster feedback loop (you don't need to upload the code every time) although this option is a bit limited since you can't really test the behavior of the external hardware components it also requires you to organize the code in a certain way, use the mocks, etc.
I have covered unit testing in this video(for ESP8266 but this will also work with ESP32 boards): ruclips.net/video/KPesyRp8qqo/видео.html
Also both of these topics are definitely going to be covered in future videos :)
Dobra robota dobry angielski i typowo polski akcent
Dzięki.
W końcu algorytm YT podsunął mi coś sensownego. Nie znam angielskiego ale zrozumiałem Cię bez problemu i w teorii nauczyłeś mnie skompilowania kodu pod mrygałkę led. :)
W sumie rozglądałem się za informacjami o ESP32-S2-HMI-DevKit-1. Miałeś to może w rękach?. Nie wiem o co chodzi, ale coś tego nawet nie idzie kupić. Prowadzisz odpłatne nauczanie? :)
Hej, dzięki cieszę się że mogłem pomóc. Nie miałem do czynienia jeszcze z ESP32-S2-HMI-DevKit-1 i rzeczywiście ciężko go dostać. Bardziej ciekawi mnie ta alternatywa o której chcę zrobić film:
www.makerfabs.com/esp32-s2-parallel-tft-with-touch-3-5-ili9488.html
Jeżeli chodzi o odpłatne nauczanie to póki co ciężko mam z czasem ale pomyślę o czymś na przyszłość.
Which one is better between ESP32S2 WROVER I and ESP32S2 WROOM I, thanks
hey Gyovi, based on characteristics from the official datasheets:
www.espressif.com/sites/default/files/documentation/esp32-s2-wroom_esp32-s2-wroom-i_datasheet_en.pdf
www.espressif.com/sites/default/files/documentation/esp32-s2-wrover_esp32-s2-wrover-i_datasheet_en.pdf
the only difference is additional PSRAM of 2MB on WROVER MCUs (because of that IO26 pin is connected to the CS pin of the PSRAM and cannot be used for other functions).
Here is more about PSRAM itself if you're interested:
thingpulse.com/esp32-how-to-use-psram/
So to summarise - WROVER seems to be slightly better but only if you need more RAM memory in your project.
Hi, I try to start a new project in platformio but it is stuck at initialization for very long. I am using esp32 wroom. Any idea the reason for this?
Make sure your internet connection is good. Also you can try to run:
platform project init --board esp32dev
from the terminal in VS Code to find out more info about the problem
also make sure you have python installed
Hello my friend ;)
How do I connect the esp32-s2 with a 1602a LCD Screen?
hey, have a look at platformio libraries and try the examples there: registry.platformio.org/search?q=1602&p=1
I'll add this subject to my todo list and cover it in the future.
Hello tomasz, is it possible to install wled in it , i have this Board and the project is to make Hyperion Control lightstrip from wi-fi, i need a big help
hey Ricardo, yes it is possible to connect ESP32-S2 with LED strip and program it. Can you give me some details on what you're trying to achieve?
@@tomasztarnowski4434 ,hello, i mande it, its working now with a firmware a guy send me in discord, its perfect now with wled and Hyperion, controling the LED's.thanks for help.
I am not sure how the wifi works during light sleep - when I send ESP32-S2 to light sleep and don't do entire reconnect to wifi, it simply does not seem connected to the router, so follow up would be nice.
Btw my sensors wake up (from deep sleep), perform measurements (temp, hum, light, CO2), send over MQTT and go to sleep - all of that takes less. than 1.5s - the wifi only part takes 200ms - and in deep sleep I am getting around 25uA of the current.
I am not sure how wifi enabled in light sleep with 400uA current would be any better than deep sleep with 25uA current to my battery.
Yeah, you're probably right there's not much benefit from using light sleep mode over deep sleep I guess there might be a specific case where you want to keep something in the memory between sleep and next wake up cycle
@@tomasztarnowski4434 I went down to 8uA now with deep sleep ;-) "u mnie dziala!" ;-)
Znakomita robota.
Niestety nie działa I2C i OTA co obecnie praktycznie uniemożliwia sensowne wykorzystanie tego procesora.(a mam ich 24szt.) Może jakieś sugestie ?
Wielkie dzięki i pozdrawiam.
hej, dzieki :) niestety jeszcze nie testowalem I2C i OTA z S2, jak znajde troche czasu to postaram sie sprawdzic :)
WIem że kanał anglojęzyczny, ale napiszę po polsku. Kurde kanał z dobrymi materiałami po angielsku w teorii powienien dużo wyświetleń, ale nie ma. Zastanawiam się jak to jest, w teorii powinno być więcej widzów anglojęzycznych to trafi do szerszej puli widzów. Nie zastanawiałeś się żeby zacząć robić coś na rynku polskim, kanał KoValsky majstruje, który nie wrzuca nic od dawna, a jest w podobnej tematyce ma 14k widzów tylko w Polsce, co myśle na taki niszowy kanał to sporo. Może to nisza jest ważniejsza niż szeroki zasięg. Pozdrawiam.
Hej, dzięki za komentarz. Myślę że kanał jest jeszcze na dość wczesnym etapie (filmy zacząłem tworzyć i wrzucać 6 miesięcy temu) i potrzebuje trochę czasu, natomiast co do języka to zależy mi właśnie żeby treść trafiała do jak największej liczby odbiorców. Jeżeli chodzi o tą tematykę to nie ma zbyt wielu kanałow z instrukcjami jak budować urządzenia, API, aplikacje itp. krok po kroku i to jest nisza którą probuje wypełnić.
Witam imię i nazwisko czysto Polskie. Good Job.
Thanks!
Vot bi po russki poslushat