Need help getting Arduino code working in VSCODE

orbitcoms
Posts: 149
Joined: Fri Aug 03, 2018 10:08 pm
Location: Sydney, Australia

Need help getting Arduino code working in VSCODE

Postby orbitcoms » Thu Oct 21, 2021 9:47 pm

Hi,

I am wanting to get Arduino code running in VSCODE.
I have ESP-IDF extension V1.2.0 and latest version of VSCODE.

Tried following the steps given by Espressif but cannot get it to build.

These are the steps I used.
1. Copied a working project to a new folder and remove all except bare bones main loop code to make it a blank project
2. Compiled the blank code OK
3. Used "Add Arduino ESP32 as ESP-IDF Component functionand it added Arduino file in a component folder ok
4. Modified name of main.c to main.cpp and changed also in CMakelists.txt
5. Added the very simple code below
#include "Arduino.h"

[code]
#include "Arduino.h"

void setup(){
Serial.begin(115200);
}

void loop(){
Serial.println("loop");
delay(1000);
}
[/code]

When I compile I get these errors (attached). Are they issues from something in the menuconfig or something else I need to change?

[attachment=0]arduino errors.png[/attachment]
Attachments
arduino errors.png
arduino errors.png (65.65 KiB) Viewed 2993 times

username
Posts: 534
Joined: Thu May 03, 2018 1:18 pm

Re: Need help getting Arduino code working in VSCODE

Postby username » Fri Oct 22, 2021 3:17 am


Who is online

Users browsing this forum: No registered users and 79 guests