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.
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.