Given all the great code and explanations in the eBook “Learning ESP32 using Arduino IDE”, the IDE leaves me wanting. Is there anything written that would help in transitioning to platformIO IDE ? It is a much better IDE, and long-term is where I want to be when developing for ESP32 applications.
Hi Joe.
For a quick start, we have the following getting started guides for VS Code:
- Getting Started with VS Code and PlatformIO IDE for ESP32 and ESP8266 (Windows, Mac OS X, Linux Ubuntu)
- VS Code Workspaces with ESP32 and ESP8266 Projects
- ESP32 with VS Code and PlatformIO: Upload Files to Filesystem (SPIFFS)
I see that you have access to the Build Web Server with ESP32 and ESP8266 eBook. In that eBook, all projects are built using VS Code. So, following that eBook might be a good way to get familiar with VS Code while learning about building web servers.
I hope this helps.
Regards.
Sara
Hi Sara … thanks. I’ve gone through that book entirely and know VS Code pretty well (that’s why I want to transition to it !). The issue I have has to do with all the libraries that are downloaded in the Arduino IDE modules in the “Learning ESP32 via Arduino IDE” book. Can all the modules in that book be done easily in VS Code? If not, is there a good example of a complex module in that book that is done in VS Code (e.g something requiring an Arduino library, like the OLED one: Adafruit_SSD1306)? Thanks for your time and help 🙂 — Joe
Hi Joe.
When it comes to libraries, you need to include them in your project.
It’s straightforward. Follow the section “Installing ESP32/ESP8266 Libraries on PlatformIO IDE” of this tutorial: https://randomnerdtutorials.com/vs-code-platformio-ide-esp32-esp8266-arduino/
Always check the details of the library you’re installing to make sure you’re installing the right library.
I hope this helps.
Regards,
Sara
Hi Sara … finally getting back to this. So, a question I have is: why do most of your tutorials use Arduino IDE ? The VisualStudio IDE performs the compiles in less than 1/2 the time, and provides a better debug environment.
I do wish there was a more serious IDE (like TI’s Eclipse) for the ESP32, but again, most of your VERY HELPFUL tutorials are in Arduino.
You can close this question (hopefully moving your tutorials to VS Code IDE won’t be full of problems!). — JoeM
Hi.
We use Arduino IDE in most of the tutorials because it’s easier for beginners.
Those who are familiar with VS Code can easily copy the code to a project on VS Code and install the required libraries if needed. All projects should work on VS Code without problems.
I’ll mark this issue as resolved. If you need further help, you just need to open a new question in our forum.
Regards,
Sara
… just had a problem: a simple blink-the-LED code works fine in both Arduino IDE and VS code (i.e the LED blinks), but the Serial.print won’t appear on the terminal in VS Code – it does in Arduino (stating LED on … LED off). When I open the Serial Monitor in VS Code, the blinking stops until I exit out of the Serial Monitor … any idea as to what’s happening? (I’m using an ESP-CAM with the micro-USB programmer daughter board – again the Arduino IDE download and Serial Monitor work as expected). Thanks! ( I have the monitor_speed = 115200 as required in the platformIO file).
Hi.
I’m not sure what might be wrong…
Are you using a GPIO that’s required for booting or for Serial communication?
Regards,
Sara
.. it’s weird all right. Nothing is changed between Arduino IDE and VS Code – same pins, same code, yet the serial monitor doesn’t work only in VS Code. … I’m only turning on the internal LED flashlight on pin 4 — the code works from both IDEs, so I know it’s programmed correctly. I tried commenting out the LED on/off statements, and same thing – I get the following when I activate the platformIO serial monitor:
Executing task in folder blinkAgainLED: C:\Users\JoeM\.platformio\penv\Scripts\platformio.exe device monitor
and then it shows:
— Terminal on COM5 | 115200 8-N-1
— Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
— More details at https://bit.ly/pio-monitor-filters
— Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
and freezes (i.e. the blinking LED stops until I quit out of the serial monitor).
I need to try a regular ESP32 (I’m using the ESP32-CAM with micro-USB board) – it probably has something to do with the daughter board (that’s what converts from USB to UART) and VS Code. I’ve used VS Code with “regular” ESP32s fine, so it must be related to this hardware. … can you leave this question open until I can try that? (won’t be for a few weeks). Thanks Sara.