Teclado y LCD 2x16

Dependencies:   TextLCD keypad mbed

Files at this revision

API Documentation at this revision

Comitter:
franni
Date:
Thu Apr 27 02:14:38 2017 +0000
Parent:
1:faf520c1baac
Child:
3:1d6991afb5ed
Commit message:
Revision 1

Changed in this revision

test1.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/test1.cpp	Mon Apr 24 23:07:57 2017 +0000
+++ b/test1.cpp	Thu Apr 27 02:14:38 2017 +0000
@@ -2,7 +2,7 @@
 #include "TextLCD.h" 
 #include "Keypad.h"
  
-Serial        rs232(USBTX, USBRX);
+Serial rs232(USBTX, USBRX);
 AnalogIn Ain(PTB0); 
 
 float ADCdata;
@@ -27,11 +27,9 @@
 
  
 int main()
-{
-
-    
+{   
     //             r0    r1     r2    r3     c0    c1      c2     c3
-    Keypad keypad(PTC9, PTC8,  PTA5,  PTA4, PTA12, PTD4,  PTA1,  PTA2);
+    Keypad keypad(PTA1, PTA2,  PTD4,  PTA12, PTA4, PTA5,  PTA13,  PTD5);
     keypad.attach(&cbAfterInput);
     keypad.start();  // energiza columnas c0-c3 del keypad
     
@@ -44,6 +42,8 @@
     while (1) {
         //ADCdata=Ain;
         //rs232.printf("%f \n\r",ADCdata);
+        //rs232.baud (115200);
+        //rs232.format(8, Serial::Even, 1);
         rs232.printf(" %f ",Ain.read()*5);
         wait(.1);
         __wfi();