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
- Revision:
- 6:a995aabdcbcc
- Parent:
- 5:3298063f12fe
diff -r 3298063f12fe -r a995aabdcbcc main.cpp
--- a/main.cpp Mon Feb 06 15:26:22 2017 +0000
+++ b/main.cpp Mon Feb 20 13:10:52 2017 +0000
@@ -249,7 +249,7 @@
if (wd.WatchdogCausedReset())
printf("Watchdog caused reset.\r\n");
- wd.Configure(5.0);
+ wd.Configure(5.0); // Watchdog configured for a 5 second timeout.
float reading_pp; // Create variable to store pp reading.
bool cable_connected = false; // Create boolean to flag whether a cable is attached.
@@ -257,6 +257,8 @@
while(true) // Start of process loop.
{
+ wd.Service(); // Service the Watchdog so it does not cause a system reset.
+
// check the cable using pp value
reading_pp = pp_value.read(); // Read pp value and ...
reading_pp = reading_pp * 3300; // ... multiply it by 3300 to convert to mV.