oled 16x24 767 1

Dependencies:   mbed SSD1306_128x64_I2C

Files at this revision

API Documentation at this revision

Comitter:
caa45040
Date:
Tue Jul 26 13:39:39 2022 +0000
Commit message:
oled 16x24 767 1

Changed in this revision

SSD1306_128x64_I2C.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SSD1306_128x64_I2C.lib	Tue Jul 26 13:39:39 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/jk1lot/code/SSD1306_128x64_I2C/#46dcbaa430f4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Jul 26 13:39:39 2022 +0000
@@ -0,0 +1,36 @@
+#include "mbed.h"
+#include "SSD1306.h"
+
+#define ADDR     (0x3c<<1) //  address
+//#define ADDR     (0x3d<<1) //  address
+
+//i2c initialization
+I2C i2c(I2C_SDA, I2C_SCL); //767
+
+// Host PC Communication channels
+Serial pc(USBTX, USBRX); // tx, rx
+
+// Instantiate OLED
+SSD1306 oled(i2c, ADDR);
+
+int ii; //ループカウンター
+int nn; //文字カウンター
+
+//メイン関数
+int main() {       
+
+    //シリアルの初期化
+    pc.baud(9600);    
+    
+    char n1_8[] = "12345678";
+    
+    ii=0;
+    for(nn=0;nn<8;nn++){
+        //                y   x
+        oled.writeBigChar(0, ii*16,n1_8[nn]);
+        ii = ii + 1;
+    } //for
+    pc.printf("Printed something\r\n");    
+    while(1){}
+
+}//main
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Jul 26 13:39:39 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/86740a56073b
\ No newline at end of file