Vscode arduino extension

i'm trying to use the vscode arduino extension. its running fine when i'm not using any library, but when i including the wire.h library, my board is keep reseting. here is my stuff

i2c_scanner:

#include <Wire.h>

void setup() {
  Wire.begin();

  Serial.begin(115200);
  while (!Serial);             // Leonardo: wait for serial monitor
  Serial.println("\nI2C Scanner");
}


output done uploading


output serial monitor

my c_cpp_properties.json

{
    "version": 4,
    "configurations": [
        {
            "name": "Arduino",
            "compilerPath": "C:\\Users\\SAGITA\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7\\bin\\avr-g++",
            "compilerArgs": [
                "-w",
                "-std=gnu++11",
                "-fpermissive",
                "-fno-exceptions",
                "-ffunction-sections",
                "-fdata-sections",
                "-fno-threadsafe-statics",
                "-Wno-error=narrowing"
            ],
            "intelliSenseMode": "gcc-x64",
            "includePath": [
                "C:\\Users\\SAGITA\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino",
                "C:\\Users\\SAGITA\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\eightanaloginputs",
                "C:\\Users\\SAGITA\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\libraries\\Wire\\src",
                "c:\\users\\sagita\\appdata\\local\\arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7\\lib\\gcc\\avr\\7.3.0\\include",
                "c:\\users\\sagita\\appdata\\local\\arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7\\lib\\gcc\\avr\\7.3.0\\include-fixed",
                "c:\\users\\sagita\\appdata\\local\\arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7\\avr\\include"
            ],
            "forcedInclude": [
                "C:\\Users\\SAGITA\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino\\Arduino.h"
            ],
            "cStandard": "c11",
            "cppStandard": "c++11",
            "defines": [

im using:
vscode extension for Arduino v 0.4.11
vscode extension C/C++ latest version
Arduino IDE 1.8.5

anyone know whats going on here?

I'm not a VScode user but just curious where you think that you see the reset? Maybe the closing/openings serial port is confusing you?

This isn't an answer, but it might be helpful:

I never had much luck wrangling the Arduino extension for VSCode, but as an alternative, I found PlatformIO very reliable and easy to get working for Arduino dev in VSCode.

@toddnz @sterretje my bad. i test it in 2 board, and that board i think is the problem. when i get my third board my vscode is working fine, thanks

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.