AirsoftTimer software based on mbed

Dependencies:   mbed TextLCD keypad

Revision:
4:2c91c9eccf3a
Parent:
0:4a0929f1b4fd
Child:
5:be598835bab0
diff -r ce34dfe2463b -r 2c91c9eccf3a Airsofttimer.cpp
--- a/Airsofttimer.cpp	Fri Dec 12 20:07:28 2014 +0000
+++ b/Airsofttimer.cpp	Sat Dec 13 10:11:24 2014 +0000
@@ -1,16 +1,43 @@
 
 #include "Airsofttimer.h"
 
+//    buttonPin   = P0_4;    //P0.4
+//    keyPin      = P0_5;    //P0.5
+//    ledAPin     = P2_4;    //P2.4
+//    ledBPin     = P2_5;    //P2.5
+//    buzzerPin   = P2_3;    //P2.3
+//    keyboardRowPins = {P0_8 , P0_9 , P0_10, P0_11};              // ROWS=P0.8 -> P0.11
+//    keyboardColPins = {P0_16, P0_17, P0_18};                     // COLS=P0.16 -> P0.18
+//    lcdPins      = {P1_31, P1_30, P0_23, P0_24, P0_23, P0_26};   // E=P1.31, RS=P1.30, D4=P0.23 -> D7=P0.26
 
-/*Airsofttimer::Airsofttimer(){
+Airsofttimer::Airsofttimer(Pinouts pinouts){
+    //create lcd
+    lcd = new LCD(pinouts.lcd.rs, pinouts.lcd.e, pinouts.lcd.p4, pinouts.lcd.p5, pinouts.lcd.p6, pinouts.lcd.p7, LCD::LCD20x4);
+    //create leds
+    //create button
+    //create key
+    //create keyboard
+    init();
+    //run();
+}
 
-    buttonPin   = P0_4;    //P0.4
-    keyPin      = P0_5;    //P0.5
-    ledAPin     = P2_4;    //P2.4
-    ledBPin     = P2_5;    //P2.5
-    buzzerPin   = P2_3;    //P2.3
-    keyboardRowPins = {P0_8 , P0_9 , P0_10, P0_11};              // ROWS=P0.8 -> P0.11
-    keyboardColPins = {P0_16, P0_17, P0_18};                     // COLS=P0.16 -> P0.18
-    lcdPins      = {P1_31, P1_30, P0_23, P0_24, P0_23, P0_26};   // E=P1.31, RS=P1.30, D4=P0.23 -> D7=P0.26
+const char* Airsofttimer::LOGO[16] = {
+    "    \xFF\xFF\xFF  \xFF  \xFF\xFF\xFF", 
+    "    \xFF \xFF  \xFF  \xFF", 
+    "    \xFF\xFF\xFF  \xFF  \xFF",  
+    "    \xFF    \xFF  \xFF\xFF\xFF"
+};
+
 
-}*/
\ No newline at end of file
+void Airsofttimer::init(){
+    // initial beep on startup
+    // clear screen
+    // show PIC logo
+    for(int line = 0; line < 4; line++){
+        //lcd->setCursor(0,line);
+        //lcd->print(LOGO[line]);    
+    }
+    // wait 5 sec
+    // clear LCD    
+    
+}