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

Files at this revision

API Documentation at this revision

Comitter:
1050186
Date:
Thu Apr 14 02:56:23 2016 +0000
Parent:
0:52f96d297004
Commit message:
Change main.cpp for optimization due to the version-up of the online compiler.

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-src.lib Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- 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);
     }
 }
--- a/mbed-src.lib	Fri Apr 24 02:46:39 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://developer.mbed.org/users/mbed_official/code/mbed-src/#5831be29b0ad
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Apr 14 02:56:23 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/082adc85693f
\ No newline at end of file