AirsoftTimer software based on mbed

Dependencies:   mbed TextLCD keypad

Committer:
sillevl
Date:
Sun Feb 10 09:58:24 2013 +0000
Revision:
1:c80248c83025
Parent:
0:4a0929f1b4fd
Child:
2:f8e46daca111
with embed library

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sillevl 1:c80248c83025 1 #include "mbed.h"
sillevl 1:c80248c83025 2 //#include "Airsofttimer.h"
sillevl 1:c80248c83025 3 #include "TextLCD.h"
sillevl 1:c80248c83025 4
sillevl 1:c80248c83025 5
sillevl 1:c80248c83025 6
sillevl 1:c80248c83025 7
sillevl 1:c80248c83025 8 DigitalOut myled1(LED1);
sillevl 1:c80248c83025 9 DigitalOut myled2(LED2);
sillevl 1:c80248c83025 10 DigitalOut myled3(LED3);
sillevl 1:c80248c83025 11 DigitalOut myled4(LED4);
sillevl 1:c80248c83025 12
sillevl 1:c80248c83025 13 DigitalOut rs(P1_30);
sillevl 1:c80248c83025 14 DigitalOut e(P1_31);
sillevl 1:c80248c83025 15 DigitalOut d4(P0_23);
sillevl 1:c80248c83025 16 DigitalOut d5(P0_24);
sillevl 1:c80248c83025 17 DigitalOut d6(P0_25);
sillevl 1:c80248c83025 18 DigitalOut d7(P0_26);
sillevl 1:c80248c83025 19
sillevl 1:c80248c83025 20 DigitalOut leda(P2_4);
sillevl 1:c80248c83025 21 DigitalOut ledb(P2_5);
sillevl 1:c80248c83025 22
sillevl 1:c80248c83025 23 int main()
sillevl 1:c80248c83025 24 {
sillevl 1:c80248c83025 25 //TextLCD lcd(P1_30, P1_31, P0_23, P0_24, P0_23, P0_26); // rs, e, d4-d7
sillevl 1:c80248c83025 26
sillevl 1:c80248c83025 27 while(1) {
sillevl 1:c80248c83025 28 //lcd.cls();
sillevl 1:c80248c83025 29 //lcd.printf("AirsoftTimer\n");
sillevl 1:c80248c83025 30 myled1 = 1;
sillevl 1:c80248c83025 31 myled2 = 1;
sillevl 1:c80248c83025 32 myled3 = 1;
sillevl 1:c80248c83025 33 myled4 = 1;
sillevl 1:c80248c83025 34 rs = e = d4 = d5 = d6 = d7 = 1;
sillevl 1:c80248c83025 35 leda = ledb = 1;
sillevl 1:c80248c83025 36 wait(0.2);
sillevl 1:c80248c83025 37
sillevl 1:c80248c83025 38 ///////////////////////
sillevl 1:c80248c83025 39
sillevl 1:c80248c83025 40 myled1 = 0;
sillevl 1:c80248c83025 41 myled2 = 0;
sillevl 1:c80248c83025 42 myled3 = 0;
sillevl 1:c80248c83025 43 myled4 = 0;
sillevl 1:c80248c83025 44 rs = e = d4 = d5 = d6 = d7 = 0;
sillevl 1:c80248c83025 45 leda = ledb = 0;
sillevl 1:c80248c83025 46 wait(0.2);
sillevl 1:c80248c83025 47 }
sillevl 1:c80248c83025 48 }