First wall heart

Dependencies:   mbed

main.cpp

Committer:
griszAndy
Date:
2016-04-11
Revision:
0:d0d0c639618c

File content as of revision 0:d0d0c639618c:

#include "mbed.h"
//columnas
DigitalOut col1(PTA1);
DigitalOut col2(PTA2);
DigitalOut col3(PTD4);
DigitalOut col4(PTA12);
DigitalOut col5(PTA4);

//filas
DigitalOut floor1(PTA13);
DigitalOut floor2(PTD5);
DigitalOut floor3(PTD0);
DigitalOut floor4(PTD2);
DigitalOut floor5(PTD3);

int main() {
    while(1) {
        
        col1 = 1;
        floor3 = 1;
        floor4 = 1;
        wait(0.002);
        col1 = 0;
        floor3 = 0;
        floor4 = 0;
        wait(0.002);
        
        col2 = 1;
        floor2 = 1;
        floor3 = 1;
        floor4 = 1;
        floor5 = 1;
        wait(0.002);
        col2 = 0;
        floor2 = 0;
        floor3 = 0;
        floor4 = 0;
        floor5 = 0;
        wait(0.002);
        
        
        col3 = 1;
        floor1 = 1;
        floor2 = 1;
        floor3 = 1;
        floor4 = 1;
        wait(0.002);
        col3 = 0;
        floor1 = 0;
        floor2 = 0;
        floor3 = 0;
        floor4 = 0;
        wait(0.002);
        
        
        col4 = 1;
        floor2 = 1;
        floor3 = 1;
        floor4 = 1;
        floor5 = 1;
        wait(0.002);
        col4 = 0;
        floor2 = 0;
        floor3 = 0;
        floor4 = 0;
        floor5 = 0;
        wait(0.002);
        
        
        col5 = 1;
        floor3 = 1;
        floor4 = 1;
        wait(0.002);
        col5 = 0;
        floor3 = 0;
        floor4 = 0;
        wait(0.002);
    }
}