I am using Visual Studio with Visual Micro as my IDE. When I use it to generate a new class, it uses the reference
#include "arduino.h"
The joystick object is created in two steps:
- SimpleJoystick *joystick; // This code is in GenericRemoteController and creates a global pointer to the object but doesn't create the object itself.
- joystick = new SimpleJoystick(); // this code is in the GenericRobotController begin method and is called during setup. Now references to joystick->doSomething(); should work. Iff I can get it to compile first.
Bottom line is that something is causing the search for "arduino.h" to fail and that is why I have made this post.