IRDA
Dependencies: Pulse1 TextLCD mbed
Revision 3:829a04f2ecda, committed 2015-04-29
- Comitter:
- procesadores_FAC
- Date:
- Wed Apr 29 15:56:05 2015 +0000
- Parent:
- 2:a2ec9f68d387
- Commit message:
- IRDA
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r a2ec9f68d387 -r 829a04f2ecda main.cpp --- a/main.cpp Wed Apr 29 15:47:37 2015 +0000 +++ b/main.cpp Wed Apr 29 15:56:05 2015 +0000 @@ -110,52 +110,24 @@ pc.printf(", t_ceros =%d",h0); - lcd.cls(); + lcd.locate(0,0); lcd.printf("N_bits = %d",i); + wait(1); - lcd.cls(); lcd.locate(0,0); lcd.printf("t_unos = %d",h1); lcd.locate(0,1); lcd.printf("t_ceros = %d",h0); + wait(1); pc.printf("\n\n"); lcd.cls(); lcd.printf("N_HEX="); for (i=0;i< num_bits;i =i+4){ long int x = bin[i]*8+bin[i+1]*4+bin[i+2]*2+bin[i+3]; - pc.printf("%d",x); + pc.printf("%x",x); lcd.printf("%x",x); - //if (x<10){ - - // pc.printf("%d",x); - // lcd.printf("%d",x); - //} - // if (x==10){ - // pc.printf("A"); - // lcd.printf("A"); - // } - // if (x==11){ - // pc.printf("B"); - // lcd.printf("B"); - // } - //if (x==12){ - // pc.printf("C"); - // lcd.printf("C"); - // } - //if (x==13){ - // pc.printf("D"); - // lcd.printf("D"); - // } - //if (x==14){ - // pc.printf("E"); - // lcd.printf("E"); - // } - /* if (x==11){ - pc.printf("F"); - lcd.printf("F"); - }*/ } }