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: mbed mbed-rtos 4DGL-uLCD-SE HC_SR04_Ultrasonic_Library
Diff: main.cpp
- Revision:
- 16:5250c9fe0408
- Parent:
- 15:827fbc2e07d6
- Child:
- 17:b8b68ff5e33a
--- a/main.cpp Sun Apr 26 04:16:17 2020 +0000
+++ b/main.cpp Sun Apr 26 13:32:42 2020 +0000
@@ -51,12 +51,14 @@
values[index] = distance;
dist.unlock();
+ //fill array with 5 values
index++;
if (index > 4)
{
index = 0;
}
+ //check if all the values are zero
allZero = true;
for (int i = 0; i < 5; i++){
if (values[i] != 0)