Task 3.3.2

main.cpp

Committer:
noutram
Date:
2015-09-24
Revision:
0:4473259e507f

File content as of revision 0:4473259e507f:

#include "mbed.h"

BusOut binaryOutput(D5, D6, D7);
//DigitalIn SW1(D4);

int main() {

    unsigned int uiCount = 0;

    while(1) {
        
        do {
            //Write decimal to the output
            binaryOutput = uiCount;
            
            //Increment the count
            uiCount = uiCount + 1;  
            wait(1.0);              //Delay for 1s

        //Condition to repeat
        } while (uiCount < 8);    
                            
        //Reset the count
        uiCount = 0;
        
    } //end while(1)
} //end main