I’ve been working on connecting the TMP102 temperature sensor from SparkFun to Bluz and I have it working great!
But I’ve had to change the #include’s in .h and .cpp to get it to compile. My question is how can I check this library in, in such a way that it still builds fine for the Arduino projects that it was created for, but also can be built for Bluz or Particle?
I’ve removed the following from the header:
#if defined(ARDUINO) && ARDUINO >= 100 #include "Arduino.h" #else #include "WProgram.h" #endif #include <Wire.h>
and replaced all of that with this:
#include "spark_wiring_usbserial.h" #include "spark_wiring_i2c.h" #include "spark_wiring_constants.h"
Are there some defines that I can check? I’ve been using the Particle Dev IDE to build this application.
I’d love to make this library available to everyone after it can be setup to build for all kinds of hardware.