Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of bynary_counting_Hello_World by
main.cpp
- Committer:
- xeryus1206
- Date:
- 2010-12-07
- Revision:
- 0:d6f93f0e46d4
- Child:
- 1:77d533d0d869
File content as of revision 0:d6f93f0e46d4:
#include "mbed.h"
DigitalOut bitzero(LED1);
DigitalOut bitone(LED2);
DigitalOut bittwo(LED3);
DigitalOut bitthree(LED4);
int main() {
int counter;
int b3,b2,b1,b0;
while (1) {
for (counter = 0; counter < 16; counter++) {
b3=(counter > 7);
b2=((counter-(b3*8)) > 3);
b1=((counter-(b3*8)-(b2*4)) > 1);
b0=((counter-(b3*8)-(b2*4)-(b1*2)) > 0);
bitthree = b3;
bittwo = b2;
bitone = b1;
bitzero = b0;
wait(0.5);
}
counter = 0;
}
}
