mbed to brain machine firmware. See http://klautesblog.blogspot.com for further information.

Revision:
1:90922bda2b17
Parent:
0:cf8c942ef95b
--- a/main.cpp	Sat Apr 09 12:35:35 2011 +0000
+++ b/main.cpp	Wed Apr 13 15:44:28 2011 +0000
@@ -11,6 +11,11 @@
 
 void initBrainwaves() {
 
+    // A example brain wave sequence.
+    // The sequence starts from a state of being awake.
+    // Then is goes into deep meditation.
+    // Hangs out there awhile, and then is will be going
+    // into awake again.
     brainwaves[1-1].type = 1;
     brainwaves[1-1].duration = 60;
     brainwaves[2-1].type = 0;
@@ -142,10 +147,12 @@
 
     bw_duration = brainwaves[bw_pos].duration;
 
-    int  type           = brainwaves[bw_pos].type;
+    int   type          = brainwaves[bw_pos].type;
     float pwmPeriod     = 0.0;
     float ledPulseWidth = 0.0;
     float audioFreq     = 0.0;
+    // Set the audioTimer and PWM signals to the new brain
+    // wave frequency.
     switch (type) {
         case ALFA :
             audioFreq = HZ_411_1;