![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
KEIS
main.cpp
- Committer:
- khayakawa
- Date:
- 2013-10-01
- Revision:
- 0:1a9fcc66524d
File content as of revision 0:1a9fcc66524d:
#include "mbed.h" #include "C12832_lcd.h" Serial pc(USBTX, USBRX); // tx, rx Serial device(p9, p10); // tx, rx C12832_LCD lcd; DigitalOut myled(LED1); int main() { char* ch[16]={"0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"}; char v_val[2]; char val; int tmp1,tmp2; int sd_data_on[20]={0x7E,0x00,0x10,0x17,0x01,0x00,0x13,0xA2,0x00,0x40,0x92,0xFF,0x77,0xFF,0xFE,0x02,0x44,0x32,0x05,0x70}; int sd_data_off[20]={0x7E,0x00,0x10,0x17,0x01,0x00,0x13,0xA2,0x00,0x40,0x92,0xFF,0x77,0xFF,0xFE,0x02,0x44,0x32,0x04,0x71}; lcd.cls(); lcd.locate(0,0); while(1){ myled=1; val=device.getc(); tmp1 = val/16; tmp2 = val%16; pc.printf("%s%s",ch[tmp1],ch[tmp2]); myled=0; } }