![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
helloサンプル
Fork of SB1602E_Hello by
main.cpp
- Committer:
- tek7077
- Date:
- 2016-09-12
- Revision:
- 2:e0a0d0012d3d
- Parent:
- 1:23b641db0735
- Child:
- 3:636908e4c711
File content as of revision 2:e0a0d0012d3d:
#include "mbed.h" #include "SB1602E.h" DigitalOut led( LED3 ); #if 0 I2C i2c( p22, p20 ); SB1602E lcd( i2c ); // SDA, SCL #else SB1602E lcd( p22, p20 ); // SDA, SCL #endif //SB1602E lcd( p28, p27 ); // SDA, SCL int main(){ lcd.contrast(0x30); // i2c.frequency( 100 * 1000 ); while ( 1 ) { lcd.printf( 0, "Hello world!\r" ); // line# (0 or 1), string lcd.printf( 1, "pi = %.6f\r", 3.14159265 ); wait( 1 ); led = !led; } }