A little something I was playing around with earlier, its the tail end of an if then structure........
/*
Stephen's Blink and long term clock clock accuracy
*/
int ledPin = 13; // LED connected to digital pin 13
unsigned long time;
unsigned long secloop = 1000;
unsigned long fred;
unsigned long count = 0;
int ana;
boolean liteon = false;
// The setup() method runs once, when the sketch starts
void setup() {
// initialize the digital pin as an output:
pinMode(ledPin, OUTPUT);
Serial.begin(115200);
}
// the loop() method runs over and over again,
// as long as the Arduino has power
void loop()
{
count = count + 1;
time = millis();
if (count >= 100){fred = count / 10 * 22;
ana = analogRead(1);};
if (time >= secloop){
secloop = secloop + 500;
//Serial.println(secloop/100,DEC);
if (liteon){
digitalWrite(ledPin, HIGH);
Serial.print(count,DEC);
Serial.print(" : ");
Serial.print(ana,DEC);
Serial.print(" : ");
Serial.println(secloop/1000,DEC);
count = 0;
liteon = false;
}
else
{
digitalWrite(ledPin, LOW);
liteon = true;
};
};
}
Looking again, it starts on the line above in the screenshot.
Probably a superfluous semi-colon in there somewhere........