mbed workshop intro + cansat examples

Revision:
0:f309f06aeec7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CanSat2.cpp	Thu May 10 21:14:34 2012 +0000
@@ -0,0 +1,26 @@
+#include "mbed.h"
+
+DigitalIn pressed(p20);
+
+BusOut leds(LED1, LED2, LED3, LED4);
+
+int main() {
+    for (int i = 0; !pressed; i = (i + 1) % 2)  {
+        leds = i;
+        wait(0.2);
+    }
+
+    leds = 15;
+    wait(1);
+
+    for (int i = 0; !pressed; i = (i + 1) % 4)  {
+        leds = 1 << i;
+        wait(0.5);
+        leds = 0;
+        wait(0.5);
+    }
+
+    leds = 15;
+    wait(1);
+    leds = 0;
+}
\ No newline at end of file