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(D8,D10,D11,D12,D13,D14); // rs, e, d4, d5, d6, d7) //LCD出力設定 00005 int main(){ 00006 while(1) //無限ループ 00007 { 00008 lcd.cls(); //LCD表示初期化 00009 int a = 0; //関数aを定義 00010 00011 for(a = 0; a <= 15; a++) //a 初期値0,aが15以下の間繰り返す,1周ごとに1足す 00012 { 00013 lcd.locate(a,0); //表示座標 00014 lcd.puts("@"); //LCDに文字を表示 00015 00016 wait(0.5); //0.5秒待つ 00017 00018 lcd.cls(); //LCD表示初期化 00019 } 00020 00021 for(a = 15; a >= 0; a--) //a 初期値15,aが0以上の間繰り返す,1周ごとに1引く 00022 { 00023 lcd.locate(a,1); //表示座標 00024 lcd.puts("@"); //LCDに文字を表示 00025 00026 wait(0.5); //0.5秒待つ 00027 00028 lcd.cls(); //LCD表示初期化 00029 00030 00031 } 00032 } 00033 }
Generated on Sun Jul 31 2022 18:36:03 by
1.7.2