Compile errors from SparkIntervalTimer - library was not included in code



I am porting code that works on a Photon to a Bluz. Basically the Bluz interfaces with a RS485 sensor via a TTL converter. The hardware and wiring has been tested with a Photon. Circuit is below.

I am getting compile errors from the SparkIntervalTimer library but I am not using it?! Please see image below. Any help is appreciated.

Thanks in advance.


That library could use others as dependencies, the author of the Spark Interval library added a clear check for the platform ID unfortunately, so that would have to be changed in order for it to work. You could try contacting the author of the library to make the change.


Hi @eric,

OK I will, but I am not even using this library so I am not sure why it is giving an error? My entire code is below.


int len;
char buf[60];
unsigned int i = 0;
double measure;

int byteReceived;

void setup()
pinMode(D3, OUTPUT); //Set RS485 direction pin as output
digitalWrite(D3, LOW); // Init Transceiver
Particle.variable(“Average”, &measure, DOUBLE);

void loop() // run over and over

digitalWrite(D3, LOW); // Disable RS485 Transmit
len = Serial1.readBytes((char *)buf,50);

if(len > 0)
for (int i=0; i <= len; i++)

if (buf[i] == 170)
measure = 0.0328084 * (100 * int(buf[i+1]) + (buf[i+2]));


From the first screenshot, there is a SoftSerial library included in your code. That may have pulled it in as a dependency. Even if you delete that line, the Web IDE may still compile the code with your app. So you ay need to fully remove the library from your app, or you may need to create a new app and code your code if you can’t remove the library reference.


Thank you @eric. I had not noticed that indeed the library was still there even though I had deleted the include in the code.

I wrote the app again and it compiled fine. Thanks again.


@jimmie, SparkIntervalTimer is a hardware dependent library and won’t run on the Bluz since nRF51822 hardware is very different. The ParticleSoftSerial library depends on SparkIntervaltimer. You will need to look for a Bluz-specific SoftwareSerial library.