7 Segment Binaer

Dependencies:   mbed

main.cpp

Committer:
Matthias_Praja
Date:
2017-05-02
Revision:
0:ea23c44d59f0

File content as of revision 0:ea23c44d59f0:

#include "mbed.h"

BusOut Segment(p29,p22,p23,p24,p25,p26,p21);
            //  a   b   c   d   e   f   g
int main() {
    while(1) 
    {
        Segment = 0b0000001; //0
        wait(1);
        Segment = 0b1111001; //1
        wait(1);
        Segment = 0b0100100; //2
        wait(1);
        Segment = 0b0110000; //3
        wait(1);
        Segment = 0b1011000; //4
        wait(1);
        Segment = 0b0010010; //5
        wait(1);
        Segment = 0b0000010; //6
        wait(1);
        Segment = 0b0111001; //7
        wait(1);
        Segment = 0b0000000; //8
        wait(1);
        Segment = 0b0010000; //9
        wait(1);


    }
}