Ion Systems / Mbed 2 deprecated Chipin_Main

Dependencies:   MCP23017 TCS3472_I2C WattBob_TextLCD mbed-rtos mbed

Revision:
6:e64796f1f384
Child:
10:8c0696b99692
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cardReader.h	Fri Nov 07 20:16:23 2014 +0000
@@ -0,0 +1,51 @@
+#include "mbed.h"
+
+DigitalIn cardBit1(p21);
+DigitalIn cardBit2(p22);
+DigitalIn cardBit3(p23);
+DigitalIn cardBit4(p24);
+DigitalIn cardBit5(p25);
+DigitalIn cardBit6(p26);
+DigitalIn cardDetect(p29);
+
+
+int cardValue1 = 0;
+int cardValue2 = 0;
+int cardValue3 = 0;
+int cardValue4 = 0;
+int cardValue5 = 0;
+int cardValue6 = 0;
+
+void cardAcquisition(){
+        lcd->reset();
+        lcd->locate(0,0);   //Going to new line
+        if(cardBit1) lcd->printf("p1=1,");
+        else lcd->printf("p1=0,");
+        cardValue1 = cardBit1;
+        
+        if(cardBit2) lcd->printf("p2=1,");
+        else lcd->printf("p2=0,");
+        cardValue2 = cardBit2;
+        
+        if(cardBit3) lcd->printf("p3=1");
+        else lcd->printf("p3=0");
+        cardValue3 = cardBit3;
+        
+        lcd->locate(1,0);   //Going to new line
+        
+        if(cardBit4) lcd->printf("p4=1");
+        else lcd->printf("p4=0,");
+        cardValue4 = cardBit4;
+        
+        
+        if(cardBit5) lcd->printf("p5=1,");
+        else lcd->printf("p5=0,");
+        cardValue5 = cardBit5;
+        
+        if(cardBit6) lcd->printf("p6=1");
+        else lcd->printf("p6=0");
+        cardValue6 = cardBit6;
+        
+        cardDataAcquired = true;
+        
+    }
\ No newline at end of file