
LCD 課題0 文字表示練習 ”Hello World”
Fork of LCD課題0 by
Diff: main.cpp
- Revision:
- 1:fe4982ab76f2
- Parent:
- 0:b064834f3e7a
--- a/main.cpp Fri Aug 19 06:03:24 2016 +0000 +++ b/main.cpp Thu Oct 06 05:02:04 2016 +0000 @@ -1,17 +1,17 @@ #include "mbed.h" #include "TextLCD.h" -TextLCD lcd(D8,D10,D11,D12,D13,D14); // rs, e, d4, d5, d6, d7) +TextLCD lcd(D8,D10,D11,D12,D13,D14); // rs, e, d4, d5, d6, d7) //LCD出力設定 int main(){ - while(1){ - lcd.cls(); - lcd.locate(0,0); - lcd.printf("Hello"); - wait(1.0); - lcd.cls(); - lcd.locate(0,1); - lcd.printf("World!"); - wait(1.0); - }//while -}//main \ No newline at end of file + while(1){ //無限ループ + lcd.cls(); //LCD表示初期化 + lcd.locate(0,0); //表示座標 + lcd.printf("Hello"); //文字表示 + wait(1.0); //1秒待つ + lcd.cls(); //CD表示初期化 + lcd.locate(0,1); //表示座標 + lcd.printf("World!"); //文字表示 + wait(1.0); //1秒待つ + } +} \ No newline at end of file