Factory-written program for GR-PEACH.

Dependencies:   SoftPWM mbed

Your how to videos will be live at:

https://youtu.be/Y3Wqu3FsA_o Part1

https://youtu.be/HdGGfkqVoBQ Part2

https://youtu.be/2cOqjSruDQM Part3

Revision:
1:87af4f55c068
Parent:
0:52f96d297004
--- a/main.cpp	Fri Apr 24 02:46:39 2015 +0000
+++ b/main.cpp	Thu Apr 14 02:56:23 2016 +0000
@@ -15,20 +15,20 @@
 
 static Ticker flipper;                                          // Tick Timer
 
-static DigitalOut ledu(P6_12);                                  // LED-User
-static SoftPWM ledr(P6_13);                                     // LED-Red
-static SoftPWM ledg(P6_14);                                     // LED-Green
-static SoftPWM ledb(P6_15);                                     // LED-Blue
+static DigitalOut ledu(LED_USER);                               // LED-User
+static SoftPWM ledr(LED_RED);                                   // LED-Red
+static SoftPWM ledg(LED_GREEN);                                 // LED-Green
+static SoftPWM ledb(LED_BLUE);                                  // LED-Blue
 
 static unsigned int syscnt_u;                                   // SystemCounter for LED-User
 static unsigned int syscnt_r;                                   // SystemCounter for LED-Red
 static unsigned int syscnt_g;                                   // SystemCounter for LED-Green
 static unsigned int syscnt_b;                                   // SystemCounter for LED-Blue
 
-static unsigned int flg_ledu;                                   // LED-User Flag
-static unsigned int flg_ledr;                                   // LED-Red Flag
-static unsigned int flg_ledg;                                   // LED-Green Flag
-static unsigned int flg_ledb;                                   // LED-Blue Flag
+volatile static unsigned int flg_ledu;                                   // LED-User Flag
+volatile static unsigned int flg_ledr;                                   // LED-Red Flag
+volatile static unsigned int flg_ledg;                                   // LED-Green Flag
+volatile static unsigned int flg_ledb;                                   // LED-Blue Flag
 
 void flip() {
     // Check 500ms for LED-User
@@ -136,5 +136,6 @@
             ledb = (float)cntb / 128;                           // Set LED-Blue Duty
         }
 
+        wait_us(1);
     }
 }