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.
Diff: main.cpp
- Branch:
- Blinky
- Revision:
- 63:be66d3b84cef
- Parent:
- 61:981fe979a93f
- Child:
- 66:6403ec154b77
--- a/main.cpp Wed Oct 12 10:00:10 2022 +0000 +++ b/main.cpp Wed Oct 12 10:10:44 2022 +0000 @@ -1,5 +1,6 @@ #include "mbed.h" #include "m3pi.h" +#include "mbed2/170/wait_api.h" m3pi m3pi; @@ -171,7 +172,11 @@ const float BATVOLTTRESHOLD = 0.5; // Treshold i volt int result = 0; - + led4 = 1; + wait_ms (1); + led4 = 0; + + /*Test if the voltage is below the threshold if so turn on go to pit mode*/ if (m3pi.battery() <= BATVOLTTRESHOLD ){ result = 1; // Set goto pit condition @@ -208,6 +213,8 @@ wait(a); LED_Control (ledNumber , 1); wait(a); + LED_Control (ledNumber , 0); + wait(a); } void PS_PitStop(void)