Task 3.3.2
Fork of Task332 by
main.cpp
- Committer:
- noutram
- Date:
- 2019-09-18
- Revision:
- 2:4eae1698bcf5
- Parent:
- 0:4473259e507f
File content as of revision 2:4eae1698bcf5:
#include "mbed.h"
#ifdef TARGET_NUCLEO_F429ZI
//#define ONBOARD
#endif
#ifdef ONBOARD
BusOut binaryOutput(LED1, LED2, LED3);
#else
//lsb first
BusOut binaryOutput(D5, D6, D7);
#endif
//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
