to verify the position of the LEDs
This is an attempt to address all the 25 LEDs. This has been done but only on rows. I need to arrange the column calls in some form of array which can be indexed.
Diff: main.cpp
- Revision:
- 7:0f62c513f003
- Parent:
- 6:83feebd43ec8
- Child:
- 8:7a49220aaa22
--- a/main.cpp Tue Oct 22 03:50:13 2019 +0000 +++ b/main.cpp Tue Oct 22 15:00:47 2019 +1100 @@ -24,41 +24,40 @@ DigitalOut col7(P0_10,0); DigitalOut col8(P0_11,0); DigitalOut col9(P0_12,0); -//DigitalOut myled3(P0_15); // something +//DigitalOut row3(P0_15); // something -DigitalOut myled1(P0_13); // something -DigitalOut myled2(P0_14); // guessing the layout of the LEDs ATM -DigitalOut myled3(P0_15); // something +DigitalOut row1(P0_13); // something +DigitalOut row2(P0_14); // guessing the layout of the LEDs ATM +DigitalOut row3(P0_15); // something int main() { while(1) { // for (int cv = 0; cv < 4 ; cv++) { // myLedBlink(seq[cv]); // } -// myled1 = 1; -// myled2 = 1; - myled3 = 1; -// myled4 = 1; + + row3 = 1; + wait(0.2); -// myled1 = 0; - myled3 = 0; -// myled4 = 0; + + row3 = 0; + wait(0.2); // ** - myled2 = 1; -// myled4 = 1; + row2 = 1; + wait(0.2); -// myled1 = 0; - myled2 = 0; -// myled4 = 0; + + row2 = 0; + wait(0.2); // ** - myled1 = 1; -// myled4 = 1; + row1 = 1; + wait(0.2); -// myled1 = 0; - myled1 = 0; -// myled4 = 0; + + row1 = 0; + wait(0.2); // ** //} @@ -66,4 +65,4 @@ // myLedBlink(cv); // } } -} \ No newline at end of file +}