Test des HIMINI mit dem Testboard von GOM mit COMMON +3V3 ! !
Dependencies: mbed
Revision 0:8a66b7a8a366, committed 2017-05-20
- Comitter:
- Enenkel
- Date:
- Sat May 20 07:57:54 2017 +0000
- Commit message:
- HIMINI TEST des Bordes mit mit Testboard von GOM Common +3V3 !
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r 8a66b7a8a366 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat May 20 07:57:54 2017 +0000 @@ -0,0 +1,144 @@ +/* HIMINI - TESTSOFTWARE +by Enenkel +20.5.17 V1.0 für COMMON PLUS ! +Wenn die HIMINI als USB Stick geschalten ist +leuchten die LED P0_2 und P0_6 +*/ + +#include "mbed.h" +// Alle IO als DigitalOut definiert ! +//Alle von +3V3 gegen GND angesprochen (OD) +DigitalOut P25(P2_5); +DigitalOut P020(P0_20); +DigitalOut P02(P0_2); //Pin 6 === ACHTUNG für FTDI reserviert ! +DigitalOut P22(P2_2); +DigitalOut P120(P1_20); +DigitalOut P04(P0_4); +DigitalOut P05(P0_5); +DigitalOut P021(P0_21); +DigitalOut P123(P1_23); +DigitalOut P27(P2_7); +DigitalOut P124(P1_24); +DigitalOut P06(P0_6); +DigitalOut P07(P0_7); +DigitalOut P121(P1_21); +DigitalOut P08(P0_8); +DigitalOut P09(P0_9); +DigitalOut P010(P0_10); //Pin20 +// 2. Seite des HIMINI ! +DigitalOut P023(P0_23); //Pin21 +DigitalOut P011(P0_11); +DigitalOut P012(P0_12); +DigitalOut P013(P0_13); +DigitalOut P014(P0_14); //Pin25 auf d. PCB +DigitalOut P015(P0_15); +DigitalOut P016(P0_16); +DigitalOut P022(P0_22); +DigitalOut P017(P0_17); +DigitalOut P113(P1_13); //Pin30 + +int a; +void lauflicht(); +void allOn(); +void laufli_inv(); +// ************************** Main ************************************ +int main() { + wait (3); //ALLE Led sollten leuchten ! + while(1) { + lauflicht(); + allOn(); + laufli_inv(); + } +} + +void lauflicht() { + //Alle LED AUS ! + P25=P020=P02=P22=P120=P04=P05=P021=1; + P123=P27=P124=P06=P07=P121=1; + P08=P09=P010=1; + //2.Seite + P023=P011=P012=P013=P014=P015=1; + P016=P022=P017=P113=1; + wait(3); + // jewils nur eine Diode leuchtet + P25=0; wait(1); P25=1; + P020=0; wait(1); P020=1; + P02=0; wait(1); P02=1; + P22=0; wait(1); P22=1; + P120=0; wait(1); P120=1; + P04=0; wait(1); P04=1; + P05=0; wait(1); P05=1; + P021=0; wait(1); P021=1; + P123=0; wait(1); P123=1; + P27=0; wait(1); P27=1; + P124=0;wait(1); P124=1; + P06=0; wait(1); P06=1; + P07=0; wait(1); P07=1; + P121=0;wait(1); P121=1; + P08=0; wait(1); P08=1; + P09=0; wait(1); P09=1; + P010=0;wait(1); P010=1; + //2. Seite + P023=0;wait(1); P023=1; + P011=0;wait(1); P011=1; + P012=0;wait(1); P012=1; + P013=0;wait(1); P013=1; + P014=0;wait(1); P014=1; + P015=0;wait(1); P015=1; + P016=0;wait(1); P016=1; + P022=0;wait(1); P022=1; + P017=0;wait(1); P017=1; + P113=0;wait(1); P113=1; + } + +void allOn(){ + // All LED ON + P25=P020=P02=P22=P120=P04=P05=P021=0; + P123=P27=P124=P06=P07=P121=0; + P08=P09=P010=0; + //2.Seite + P023=P011=P012=P013=P014=P015=0; + P016=P022=P017=P113=0; + wait(1); + } + +void laufli_inv() { + // all on + P25=P020=P02=P22=P120=P04=P05=P021=0; + P123=P27=P124=P06=P07=P121=0; + P08=P09=P010=0; + //2.Seite + P023=P011=P012=P013=P014=P015=0; + P016=P022=P017=P113=0; + wait(3); + // Immer NUR eine LED OFF + P25=1; wait(1); P25=0; + P020=1; wait(1); P020=0; + P02=1; wait(1); P02=0; + P22=1; wait(1); P22=0; + P120=1; wait(1); P120=0; + P04=1; wait(1); P04=0; + P05=1; wait(1); P05=0; + P021=1; wait(1); P021=0; + P123=1; wait(1); P123=0; + P27=1; wait(1); P27=0; + P124=1;wait(1); P124=0; + P06=1; wait(1); P06=0; + P07=1; wait(1); P07=0; + P121=1;wait(1); P121=0; + P08=1; wait(1); P08=0; + P09=1; wait(1); P09=0; + P010=1;wait(1); P010=0; + //2. Seite + P023=1;wait(1); P023=0; + P011=1;wait(1); P011=0; + P012=1;wait(1); P012=0; + P013=1;wait(1); P013=0; + P014=1;wait(1); P014=0; + P015=1;wait(1); P015=0; + P016=1;wait(1); P016=0; + P022=1;wait(1); P022=0; + P017=1;wait(1); P017=0; + P113=1;wait(1); P113=0; + wait (2); + } \ No newline at end of file
diff -r 000000000000 -r 8a66b7a8a366 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat May 20 07:57:54 2017 +0000 @@ -0,0 +1,1 @@ +https://mbed.org/users/mbed_official/code/mbed/builds/4eea097334d6 \ No newline at end of file