Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
00001 #include "mbed.h" 00002 #include "TextLCD.h" 00003 00004 TextLCD lcd(p24, p26, p27, p28, p29, p30); 00005 Serial pc(p13,p14); 00006 00007 int i = 0,j; 00008 char moji[16]; 00009 void rxFunc(){ 00010 int k; 00011 j = pc.getc(); 00012 00013 if ( i < 16 ){ 00014 moji[i] = j; 00015 }else{ 00016 for ( k = 0 ; k < 15 ; k++) 00017 moji[k] = moji[k+1]; 00018 moji[15]=j; 00019 } 00020 i++; 00021 pc.printf("[%c,%2d]",j,i); 00022 } 00023 00024 int main() 00025 { 00026 lcd.cls(); 00027 pc.baud(115200); 00028 pc.attach(&rxFunc,Serial::RxIrq); 00029 00030 while(1){ 00031 lcd.locate(0,0); 00032 lcd.printf("%s",moji); 00033 } 00034 00035 }
Generated on Fri Jul 15 2022 02:27:05 by
1.7.2