xt

Dependencies:   mbed

Fork of HelloWorld by Simon Ford

main.cpp

Committer:
Abhisheik
Date:
2015-06-25
Revision:
3:ea91605072d2
Parent:
2:1fa29f7e26ff

File content as of revision 3:ea91605072d2:

#include "mbed.h"

DigitalOut x(LED1),y(LED2),z(LED3),e(p9);
int main()
{
 int a,b;
 while(1)
 {
  for(a=0;a<2;a++)
  {
   for(b=0;b<2;b++)
   {
    x=a;
    y=b;
    z=1;
    wait(0.25);
    z=0;
    if(a&&b==1)
    {
     e=1;
       wait(1);
     }
     else
     {
      e=0;
      wait(1);
     }
     if(a&&b==1)
     {
         e=0;
           wait(1);
      }
      else
      {
        e=1;
        wait(1);
      }
      if(a||b==1)
      {
          e=1;
            wait(1);
       }
       else
       {
          e=0;
          wait(1);
        }
        if(a==!b)
        {
           e=1;
             wait(1);
         }
         else
         {
           e=0;
           wait(1);
         }
       }
       }
       }  
       }