Problem include arduino.h in the spark apps

Hi all

I am trying to upload a LED bar library from Grove, to the spark apps, but it seem to have some problems include the arduino.h files.

I have used this library
But gets a error about the arduino.h file when compiling.
I try to work around the problem by deleting the arduino.h line in the .cpp file(line:25).
I also seach the community to figure out the problem and found this topic

that I understand from this is that I can replace:

# include arduino.h


define ARDUINO_H
include "stdint.h"
include "stddef.h"
include "stdlib.h"

and this should works in most cases. But that it not fixing the problem. Do some of you have other ways the work around this issue.

Best Peter

You can simply remove those lines or comment using a // infront of each line :wink:

Hi Kenneth

Thanks for reply so quickly.
Already try that. Doesn’t seem to help, do you have other ideers.


I think your easiest solution is to remove the line #include "arduino.h" completely or if you want to keep it wrap it up in conditional compiler block like this

#if !defined(SPARK)
#include "arduino.h"

Normally you don’t need to replace the above include with anything - most common headers get included via application.h directly or indirectly.

BTW: Commenting out is not done with # but either with // or /* .... */.

Opps sorry :stuck_out_tongue:

Thanks @ScruffR, been coding in bash and docker language for the past 2 days :wink:

1 Like


sorry for the confusion.

Either delete off those line or simply use // to comment them