Display text on screen.
Dependencies: TextLCD mbed MaxSonar RTC-DS1307
Fork of TextLCD_HelloWorld by
Diff: main.cpp
- Revision:
- 15:1e08396885bf
- Parent:
- 14:2bde99b3345c
--- a/main.cpp Fri May 26 11:13:59 2017 +0000 +++ b/main.cpp Fri May 26 12:08:55 2017 +0000 @@ -493,6 +493,7 @@ r2 = range2->read(); } + void Clock() { questionScreen.write(1); @@ -507,7 +508,22 @@ rtc.startClock(); - while(1){ + bool clock = true; + while(clock){ + + UpdateRange(); + if(r1 < 25 && r2 < 25) + { + cloo.detach(); + if(CheckExit(r1, r2)) + { + + GameOption(); + clock = false; + break; + } + cloo.attach(&displayTime, 1); + } wait_ms(50); //wait so button states do not overlap