Task 5.2.3

Revision:
2:274f355265c9
Parent:
0:437c844cec26
--- a/main.cpp	Thu Jul 13 14:56:04 2017 +0000
+++ b/main.cpp	Fri Sep 20 13:33:01 2019 +0000
@@ -1,9 +1,15 @@
 #include "mbed.h"
 
+DigitalOut OnBoardLed(LED1);
+
+#ifdef TARGET_NUCLEO_F429ZI
+PwmOut pwmRed(D6);  //D7 is not a PWM output on the F429, so use D6 instead
+#else
 PwmOut pwmRed(D7);
+#endif
 
 int T = 10;
-int Tmark = 1;
+int Tmark = 5;
 
 int main() {
     
@@ -11,6 +17,8 @@
     pwmRed.pulsewidth_us(Tmark);
     
     while(1) {
-        sleep();
+        //Heartbeat
+        wait(1);
+        OnBoardLed = !OnBoardLed;
     }
 }