Example for sending and receiving simple broadcast commands using the RF interface on the Pi Swarm

Dependencies:   Pi_Swarm_Library_v06_alpha mbed

Fork of Pi_Swarm_Blank by piswarm

Revision:
2:e806b595f9ce
Parent:
1:37502eb3b70f
Child:
3:1aa1de26966a
diff -r 37502eb3b70f -r e806b595f9ce main.cpp
--- a/main.cpp	Sun Feb 02 21:18:16 2014 +0000
+++ b/main.cpp	Sun Feb 02 22:43:38 2014 +0000
@@ -1,11 +1,14 @@
-/* University of York Robot Lab Pi Swarm Robot Library
+/*******************************************************************************************
+ *
+ * University of York Robot Lab Pi Swarm Robot Library
  *
  * (C) Dr James Hilder, Dept. Electronics & Computer Science, University of York
  * 
- * Version 0.4  January 2014
+ * Version 0.5  February 2014
  *
- * Designed for use with the Pi Swarm Board (enhanced MBED sensor board) v1.1
- */
+ * Designed for use with the Pi Swarm Board (enhanced MBED sensor board) v1.2
+ *
+ ******************************************************************************************/
 
 #include "main.h"   // Certain parameters can be set by changing the defines in main.h
 
@@ -20,14 +23,12 @@
     int step = 0;
     
     while(1) {
-        //pc.printf("%i\n",step);
-        // Do something!
         step ++;
         if(step==6)step=0;
         switch (step%3){
-            case 0:  piswarm.set_oled_colour(200,0,0); break;
-            case 1:  piswarm.set_oled_colour(0,200,0); break;
-            case 2:  piswarm.set_oled_colour(0,0,200); break;
+            case 0:  piswarm.set_oled_colour(50,0,0); break;
+            case 1:  piswarm.set_oled_colour(0,50,0); break;
+            case 2:  piswarm.set_oled_colour(0,0,50); break;
         }
         switch (step%2){
             case 0:  piswarm.set_oleds(1,0,1,0,1,0,1,0,1,0); break;
@@ -37,6 +38,15 @@
     }
 }
 
+/***************************************************************************************************************************************
+ *
+ * Beyond this point, the outline of several optional functions is given
+ *
+ * This may be left blank but should not be deleted
+ *
+ **************************************************************************************************************************************/
+ 
+
 // Communications
 
 // If using the communication stack (USE_COMMUNICATION_STACK = 1), functionality for handling user RF responses should be added to the following functions