stm32f103c8t6 oled 16x24

Dependencies:   mbed SSD1306_128x64_I2C

Files at this revision

API Documentation at this revision

Comitter:
caa45040
Date:
Sat Mar 06 11:58:53 2021 +0000
Commit message:
stm32f103c8t6 oled 16x24 new

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
diff -r 000000000000 -r 04b274da7c38 SSD1306_128x64_I2C.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SSD1306_128x64_I2C.lib	Sat Mar 06 11:58:53 2021 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/jk1lot/code/SSD1306_128x64_I2C/#46dcbaa430f4
diff -r 000000000000 -r 04b274da7c38 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Mar 06 11:58:53 2021 +0000
@@ -0,0 +1,35 @@
+#include "mbed.h"
+#include "SSD1306.h"
+
+#define ADDR     (0x3c<<1) //  address
+//#define ADDR     (0x3d<<1) //  address
+
+//I2C i2c(I2C_SDA, I2C_SCL);
+I2C i2c(PB_7, PB_6); // STM32F103C8
+
+// Host PC Communication channels
+//Serial pc(USBTX, USBRX); // tx, rx
+Serial pc(PA_9, PA_10); // tx, rx 103
+
+// Instantiate OLED
+SSD1306 oled(i2c, ADDR);
+
+int ii; //ループカウンター
+int nn; //文字カウンター
+
+int main() {       
+    pc.baud(9600);    
+    //oled.writeString(0, 0, "Hello World !");  
+    
+    
+    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");    
+    while(1){}
+}
diff -r 000000000000 -r 04b274da7c38 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Mar 06 11:58:53 2021 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file