Hello
I have a photoresistor connected to analog input to turn on the lights (if analog input is greater than X turn on the light). I want to use the spark to change the threshold value, instead of flashing with the new value, to post the new value to the spark, something like :
in the spark code
{
If analogRead(A1) > threshold than
digitalWrite(D1, HIGH);
}
Might want to load the last value from memory (EEPROM.read) at startup and then write it whenever it changes (EEPROM.Write) so your threshold value will survive restarts and power failure