LoginSignup
0
0

More than 1 year has passed since last update.

STM32F767とOLED、OLED096UNO-Aで12345678を表示(16x24)

Last updated at Posted at 2022-07-26

x mbed2のリビジョン143です。
x SSD1306_128x64_I2Cライブラリインストール済
x 注意 説明を大幅に省略

o_con595.jpg

o_con593.jpg

o_con594.jpg

o_con596.jpg

忙しい人よう(ライブラリーが変にマージされている注意)
リンク先が正しいのを確認しました。8/5

Dai YokotaさんのSSD1306_128x64_I2Cライブラリを使用した。

1308のライブラリ

oled_helloworld_16x24_767_1



#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




0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0