helloサンプル

Dependencies:   SB1602E mbed

Fork of SB1602E_Hello by Tedd OKANO

Files at this revision

API Documentation at this revision

Comitter:
tek7077
Date:
Wed Sep 21 00:25:49 2016 +0000
Parent:
2:e0a0d0012d3d
Commit message:
lcd test

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r e0a0d0012d3d -r 636908e4c711 main.cpp
--- a/main.cpp	Mon Sep 12 09:44:13 2016 +0000
+++ b/main.cpp	Wed Sep 21 00:25:49 2016 +0000
@@ -1,14 +1,9 @@
 #include "mbed.h"
 #include "SB1602E.h"
 
-DigitalOut led( LED3 );
-#if 0
+Serial pc(USBTX,USBRX);
 I2C i2c( p22, p20 );
-SB1602E lcd( i2c );    //  SDA, SCL
-#else
-SB1602E lcd(  p22, p20 );    //  SDA, SCL
-#endif
-//SB1602E lcd( p28, p27 );  //  SDA, SCL
+SB1602E lcd(  p22, p20 );
 
 int main(){
     lcd.contrast(0x30);
@@ -18,6 +13,6 @@
             lcd.printf( 0, "Hello world!\r" );    //  line# (0 or 1), string
             lcd.printf( 1, "pi = %.6f\r", 3.14159265 );
         wait( 1 );
-        led = !led;
+        
     }
 }