Open kierdavis opened 6 years ago
The requirements of an Arduino sketch is that there be at least one file with the .ino extension in a folder of the same name.
I was able to compile your code using the Arduino IDE after simply:
Most Arduino users would probably be a bit thrown off by the primary sketch file being empty since this is the open tab when the sketch is opened (even though all the other source files are right there in the Arduino IDE as tabs). For the most user friendly experience I would recommend:
sb-servo-asm-fw
(or any other appropriate descriptive name).sb-servo-asm-fw.ino
).If you prefer to bundle a specific version of the Adafruit PWM Servo Driver Library (instead of requiring the user to install the library) the use of submodules is not ideal since they are not included in the file provided by GitHub's Clone or download > Download ZIP (which is commonly used instead of git clone by Arduino users). Instead I would recommend using a Git subtree, which does not have that issue. Put the library inside the src subfolder of the sketch folder and change the includes in the sketch from:
#include <Adafruit_PWMServoDriver.h>
to:
#include "src/Adafruit_PWM_Servo_Driver_Library/Adafruit_PWMServoDriver.h"
Unfortunately the author of that library used the incorrect include syntax (https://github.com/adafruit/Adafruit-PWM-Servo-Driver-Library/pull/33) for the internal include of the library so line 18 of Adafruit_PWMServoDriver.cpp also needs to be changed from:
#include <Adafruit_PWMServoDriver.h>
to:
#include "Adafruit_PWMServoDriver.h"
As mentioned in #6, the firmware may be extended by competitors, who will likely be using the Arduino IDE. At the least this project should be buildable out of the box with the Arduino IDE - ideally this should be our primary build tool, to ensure compatibility.