Dependencies:   LM75B mbed

main.cpp

Committer:
PosztosAlex
Date:
2016-01-21
Revision:
0:f92cc048fef2

File content as of revision 0:f92cc048fef2:

#include "mbed.h"


BusOut Led(P1_8,P1_9,P1_10,P1_11,P1_0,P1_1,P1_3,P1_4,P1_6,P1_7,P1_12,P1_13); 
int main() 
{ 
    while(1) 
    { 
    Led = 0;
    wait_ms(100);
   
    for (char j = 0b0000;j<0b1100;j++)
    {   
        Led = 0b1<<j | Led ;
        
        wait_ms(80);
    }
    for (char j = 0b0;j<0b1100;j++)
    {
        Led =  Led & 0b1111111111111 >> j ;
        wait_ms(80);
    }
     for (char j = 0b0;j<0b1010;j++)
    {           Led = Led & 0b0;
                wait(0.07);
                Led = 0b111111111111;
                wait(0.25);
                
    }}
    }