![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
A program designed to get the distance from an SRF02 distance sensor and create an audible and visual indication of that distance with data logging capabilities.
Dependencies: N5110 PowerControl SRF02 mbed
Diff: main.cpp
- Revision:
- 8:fc978cfd5763
- Parent:
- 7:65bdd2d0d6ad
- Child:
- 9:4a319e9db41c
diff -r 65bdd2d0d6ad -r fc978cfd5763 main.cpp --- a/main.cpp Sat Apr 11 15:55:42 2015 +0000 +++ b/main.cpp Sat Apr 18 16:14:58 2015 +0000 @@ -16,6 +16,8 @@ void welcomeScreen() { + display.init(); /// Initialise the display. + display.clear(); /// Clears the starting pattern from the screen. display.printString("--++--++--++--",0,0); ///Print string of "" at x,y locations. display.printString("Distance",18,1); display.printString("Sensor",22,2); @@ -161,8 +163,6 @@ semihost_powerdown(); pc.baud(9600); ///setting the baud rate timer.attach(&timerExpired,1); ///every one second runs timer expired? - display.init(); /// Initialise the display. - display.clear(); /// Clears the starting pattern from the screen. welcomeScreen(); /// Displays the welcome screen. pc.attach(&serialISR); /// attach serial ISR char buffer[30]; /// buffer used to store time string