Ok so I am doing my first real project from scratch.
I am wanting to take 2 readings from the same sensor (digital) 5 seconds apart and compare the 2 readings and turn on a led if the value is higher or another on if it's lower.
Could I please get some help on how to do this.
Thanks in advance Jason
int firstReading = readSensor (); delay (5000); int secondReading = readSensor (); digitalWrite (firstLED, (firstReading > secondReading) ? HIGH : LOW);
Of course, there's a little bit of colouring-in to be done.
Thanks so much, I will let you know how I get on with the project