yuuya kimura
/
yuu
helloサンプル
Fork of SB1602E_Hello by
main.cpp
- Committer:
- okano
- Date:
- 2015-01-05
- Revision:
- 1:23b641db0735
- Parent:
- 0:da994a60a91d
- Child:
- 2:e0a0d0012d3d
File content as of revision 1:23b641db0735:
/** Hello program for the text LCD module "SB1602E" class library * * @author Tedd OKANO * @version 2.01 * @date 05-Jan-2015 * * SB1602E is an I2C based low voltage text LCD panel (based Sitronix ST7032 chip) * The module by StrawberryLinux * http://strawberry-linux.com/catalog/items?code=27002 (Online shop page (Japanese)) * http://strawberry-linux.com/pub/ST7032i.pdf (datasheet of the chip) * * This is a library to operate this module easy. * * Released under the Apache 2 license License */ #include "mbed.h" #include "SB1602E.h" DigitalOut led( LED4 ); #if 0 I2C i2c( p9, p10 ); SB1602E lcd( i2c ); // SDA, SCL #else SB1602E lcd( p9, p10 ); // SDA, SCL #endif //SB1602E lcd( p28, p27 ); // SDA, SCL int main() { // 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; } }