Toby Hammond / Mbed 2 deprecated LEDBinaryCounter
Committer:
nothing
Date:
Tue Oct 12 17:47:39 2010 +0000
Revision:
0:6c9e433eb175

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nothing 0:6c9e433eb175 1 #include "mbed.h"
nothing 0:6c9e433eb175 2
nothing 0:6c9e433eb175 3 DigitalOut myled1(LED1);
nothing 0:6c9e433eb175 4 DigitalOut myled2(LED2);
nothing 0:6c9e433eb175 5 DigitalOut myled3(LED3);
nothing 0:6c9e433eb175 6 DigitalOut myled4(LED4);
nothing 0:6c9e433eb175 7
nothing 0:6c9e433eb175 8 int counter;
nothing 0:6c9e433eb175 9
nothing 0:6c9e433eb175 10 int main() {
nothing 0:6c9e433eb175 11 while (1) {
nothing 0:6c9e433eb175 12
nothing 0:6c9e433eb175 13 for (counter = 1; counter < 16; ++counter) {
nothing 0:6c9e433eb175 14 myled1 = (counter & 1);
nothing 0:6c9e433eb175 15 myled2 = (counter & 2);
nothing 0:6c9e433eb175 16 myled3 = (counter & 4);
nothing 0:6c9e433eb175 17 myled4 = (counter & 8);
nothing 0:6c9e433eb175 18 wait(2);
nothing 0:6c9e433eb175 19 }
nothing 0:6c9e433eb175 20 }
nothing 0:6c9e433eb175 21 }
nothing 0:6c9e433eb175 22