Getting Started ESP32 with Visual Studio Code
- Install PlatformIO extension to VSCode
- Create a new Project there
- Add a Name and Select NodeMCU 32S as the Board type and Arduino as the Platform
- After creating the project check this code in the main.cpp file in the src folder
#include <Arduino.h>
void setup() {
Serial.begin(115200);
pinMode(LED_BUILTIN, OUTPUT);
Serial.println("Hello World!");
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH);
delay(1000);
digitalWrite(LED_BUILTIN, LOW);
delay(500);
Serial.println("Hello from Loop!");
}
5. Upload the code to the device by clicking the right Arrow
6. Make sure to add the bus speed to platformio.ini file as 115200
[env:nodemcu-32s]
platform = espressif32
board = nodemcu-32s
framework = arduino
monitor_speed = 115200
You can check it in the Serial Monitor tab. Select /dev/tty.usbserial-001 as the Port and 115200 as the Baud Rate.
What’s your reaction about this article?
+1
+1
2
+1
+1
+1