02/07/15

Dependencies:   mbed

Dependents:   TabbedGUIMbed

Revision:
2:7d53e9959b8f
Parent:
1:860a22e395c9
Child:
3:1ef4740c5a64
--- a/main.cpp	Tue Jun 30 11:23:01 2015 +0000
+++ b/main.cpp	Tue Jun 30 11:35:44 2015 +0000
@@ -2,24 +2,21 @@
  
 Serial pc(USBTX, USBRX); // tx, rx
 DigitalIn input(p8);
-PwmOut led(LED1);
- 
-float brightness = 0.0;
+DigitalOut led(LED1);
  
 int main() {
-    pc.printf("new program");
+    pc.printf("new program \n");
  
     while(1) {
-        if (input)
+        if (input == 1)
         {
-            pc.printf("true");
-            wait(1);
+            pc.printf("true \n");
+            led = 1;
         }
-        else
-        {
-            pc.printf("false");
-            wait(1);
+       else
+       {
+                pc.printf("true \n");
+                led = 0;
         }
- 
     }
 }
\ No newline at end of file