中野班 中野班 / Mbed 2 deprecated LCD課題0

Dependencies:   TextLCD mbed

Fork of LCD課題0 by 中野班 中野班

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

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 
00006 int main(){
00007     while(1){   //無限ループ
00008         lcd.cls();      //LCD表示初期化
00009         lcd.locate(0,0);    //表示座標
00010         lcd.printf("Hello");    //文字表示
00011         wait(1.0);      //1秒待つ
00012         lcd.cls();      //CD表示初期化
00013         lcd.locate(0,1);    //表示座標
00014         lcd.printf("World!");   //文字表示
00015         wait(1.0);      //1秒待つ
00016     }
00017 }