Cant initialize Spark.function... [solved]

I cant initialize Spark.function in setup.
“Spark” does not even turn blue like in the documentation. (http://docs.spark.io/api/)
am i missing an include???

void setup() 
{    
  Spark.function("stream", stream);  //  GET ERROR??????  
}

void stream(){
//bunch of bla bla
}

Look here: http://docs.spark.io/firmware/#spark-function

Your function will need to take in a String argument and return an int :smile:

Dude, that was fast. You rock!!

Still not sure why the web IDE does not show the class Spark as blue for Spark.function. is this a miss print?

There’s some behind the scenes work done on the Web IDE (i have no clue and access) and we should see some updates in future.

Those functions were added later and probably not picked up by the syntax highlighter!

Ok thanks, I m to used to using Visual Studio. become to dependent on syntax highlighting LOL :slight_smile:

1 Like