![](/media/cache/profiles/3b56beb4fb3143ab7f05335134909435.50x50_q85.jpg)
AnalogIn to p15 ~ LCD STEM UBC 2014
Diff: main.cpp
- Revision:
- 1:37e83b329c50
- Parent:
- 0:a56aae49b357
- Child:
- 2:dbdb78914b02
diff -r a56aae49b357 -r 37e83b329c50 main.cpp --- a/main.cpp Sat Jul 12 21:18:44 2014 +0000 +++ b/main.cpp Sat Jul 12 21:32:38 2014 +0000 @@ -19,5 +19,12 @@ lcd.cls();//clear LCD for next reading round lcd.locate(3,3);//first LCD column label lcd.printf("%1.3f\n\r",ADCdata);//print data; + if (ADCdata < (0.5)) { + lcd.locate(3,12); + lcd.printf("DARK"); + } else { + lcd.locate(3,12); + lcd.printf("LIGHT"); + } } } \ No newline at end of file