dfhfgfdghh

Dependencies:   mbed

Fork of HelloWorld by Simon Ford

Files at this revision

API Documentation at this revision

Comitter:
keerthivasan
Date:
Thu Jun 25 10:06:56 2015 +0000
Parent:
1:03c191369089
Commit message:
l1ds

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sun Jan 01 20:57:57 2012 +0000
+++ b/main.cpp	Thu Jun 25 10:06:56 2015 +0000
@@ -1,12 +1,64 @@
 #include "mbed.h"
 
-DigitalOut myled(LED1);
+DigitalOut a(LED1);
+DigitalOut b(LED2);
+DigitalOut c(LED3);
+DigitalOut p(p9);
 
-int main() {
-    while(1) {
-        myled = 1;
-        wait(0.2);
-        myled = 0;
-        wait(0.2);
-    }
-}
+int main() 
+{
+    int i,j;
+    for(i=0;i<2;i++)
+    {
+    for(j=0;j<2;j++)
+    {
+     a=i;b=j;
+     c=1;
+     wait(0.25);
+      c=0;
+      
+      if(i*j==1)
+      {
+          p=1;
+        wait(1);
+        }
+        else
+        {
+           p=0;
+         wait(1);
+        }
+        {
+         if(i*j==0)
+         {
+          p=1;
+        wait(1);
+        }
+        else
+        {
+           p=0;
+         wait(1);
+        }
+         if(i+j==1)
+         {
+             p=1;
+             wait(1);
+         }
+          else
+        {
+           p=0;
+         wait(1);
+        }
+         if(i==!j)
+         {
+             p=1;
+             wait(1);
+             }
+        else
+        {
+           p=0;
+         wait(1);
+        }
+             wait(2);}
+             }
+             }
+                 }       
\ No newline at end of file