I recently installed Atom and platformIO, created a project using the platformIO Home and created a little main.cpp, but unfortunately, when trying to build the project, it throws the the following error:
fatal error: Arduino.h: No such file or directory
on line: #include “Arduino.h”
I couldnt find any help for this problem, and ive already tried around a bit in the settings but i couldnt get it to work.
I am running Windows 10, and I have the original Arduino IDE installed on version 1.8.3
Compiling the sketch with the ArduinoIDE works perfectly fine.
It looks like ignoring files with Arduino dependencies can be a difficult task. Is there any way to add Arduino dependencies for native tasting configuration?
To be honest. I don’t understand your problem. Could you provide a simple project and describe which issues do you have? We would be glad to see your workflow.
I have something like this:
MotorDriver.h - interface for motor driver with generic methods.
ArduinoMotorDriver.cpp - class that implements MotorDriver and uses arduino lib to control motor.
NoopMotorDriver.cpp - stub implementation for MotorDriver that is used in test
DriverManager.cpp - some class that runs business logic that controls motors. It takes instance of MotorDriver.
I am writing unit test for DriverManager where I will put noop implementation of MotorDriver. I don’t want to test it with Arduino for now, I just want to test Arduino-independent code.