Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 1:5c4893846635, committed 2019-11-25
- Comitter:
- happy_alien
- Date:
- Mon Nov 25 18:12:42 2019 +0000
- Parent:
- 0:1b90d953ef92
- Commit message:
- lauflicht,rgb
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file | 
--- a/main.cpp	Wed Nov 13 13:52:25 2019 +0000
+++ b/main.cpp	Mon Nov 25 18:12:42 2019 +0000
@@ -2,14 +2,28 @@
 #include "mbed.h"
 // Flash an LED while a DigitalIn is true
 
-DigitalIn enable(BUTTON1); 
-DigitalOut led(LED1);
+DigitalIn enable(p14); 
+BusOut leds(LED1,LED2,LED3,LED4);
+BusOut rgb(p23,p24,p15);
+BusIn joy(p12,p13,p14,p15,p16);
+
+
+
  
 int main() {
+    
     while(1) {
-        if(enable) {
-            led = !led;
+            
+         if(leds==0)
+         {
+            leds=1;
+            rgb=255;
         }
-        wait(0.25);
+            else
+            
+         leds=leds<<1;   
+         rgb=rgb+1;
+        
+       wait_ms(200);
     }
-}
\ No newline at end of file
+    }