Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Speaker mbed mbed-rtos 4DGL-uLCD-SE hcsr04
Revision 11:68194bd43e0b, committed 2020-12-16
- Comitter:
- fiachra
- Date:
- Wed Dec 16 15:05:27 2020 +0000
- Parent:
- 10:f29ed3675509
- Child:
- 12:730a95b81992
- Commit message:
- fixed cm printing;
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Dec 16 13:18:49 2020 +0000
+++ b/main.cpp Wed Dec 16 15:05:27 2020 +0000
@@ -19,15 +19,16 @@
{
uLCD.text_width(1); // Normal size
uLCD.text_height(1); // Normal size
- uLCD.locate(10, 13); // Move cursor
+ uLCD.locate(10, 12); // Move cursor
uLCD.color(BLUE); // Change text color
- uLCD.printf("Reverse");
+ uLCD.printf(" Reverse Sensor");
uLCD.rectangle(65, 117, 126, 127, 0x0000FF);
while(1) {
distSens.start();
averageDistance();
beeping();
- pc.printf("cm:%ld\n",dist );
+ uLCD.filled_rectangle(66, 118, 125, 127, 0x000000);
+ pc.printf("cm:%d\n",dist );
uLCD.text_width(1); // Normal size
uLCD.text_height(1); // Normal size
uLCD.locate(10, 15); // Move cursor