This simple program for my Arduino Nano builds successfully in Arduino IDE, but fails in Atom/Pio.
#include <Arduino.h>
#include <Wire.h>
#define SERIAL_BAUD 9600
void setup() {
Wire.begin();
Serial.begin(SERIAL_BAUD);
}
void loop() {
Wire.requestFrom(8, 1);
while (Wire.available()) {
int c = Wire.read();
Serial.println(c);
}
delay(500);
}
Here is the error log pio generates.
Here is my platformio.ini
.
Any ideas what I’m doing wrong?
EDIT: My apologies, I just found out the reason, I didn’t use the .ino
extension, but .c
, I was assuming it’s .c
because the language looks like C.