7seg SPI LED mocude test program

Dependencies:   mbed spi7Seg

main.cpp

Committer:
morecat_lab
Date:
2015-01-30
Revision:
1:48e2c8603f94
Parent:
0:1d34bbc9e7a4

File content as of revision 1:48e2c8603f94:

#include "mbed.h"
#include "Spi7Seg.h"
#include "LAMd.h"

DigitalOut myled(LED1);
Spi7Seg mySpi7Seg(D5, D6, D7);

int main() {
    int i=1;
    mySpi7Seg.begin();
    while(1) {
        myled = 1;
        mySpi7Seg.writeNum(i);
//        mySpi7Seg.writeHex(i);
        mySpi7Seg.update();
        wait(0.02);
        myled = 0;
        wait(0.02);
        i++;
    }
}