0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

STM32G071とOLED,SSD1306で初期化して遊ぶ(初期化魔法のスペルは、「80-8d-80-14-80-AF」)

Last updated at Posted at 2022-09-18

x OLED096UNO-Aです。
x NUCLEO-G071RB

目的
OLEDの初期化

説明
スペルを唱える事により、OLEDを始動する

チャージポンプ 起動
ディスプレイオン 発動

画面が点いてノイズがでたらミッション完了
まず、スタートラインにつける

o_con773.jpg

o_con774.jpg

o_con776.jpg

o_con775.jpg




//ssd1306_int_071_1

#include <Arduino.h>
#include <Wire.h>

void write_s(uint8_t *str1, uint8_t len1) {

  Wire.beginTransmission(   0x3c  );

  for (int ii = 0; ii < len1; ii++) {

    //一文字出力
    Wire.write(*str1 ++);

  }//for

  Wire.endTransmission();

}//eeprom_write_s

//初期化
void setup() {

  //I2Cの初期化
  Wire.begin(); //071
  delay(200);

  //0x80,0x8d,0x80,0x14,0x80,0xAF
  write_s( (uint8_t*) "\200\215\200\024\200\257", 6);
  delay(100);

}//setup

//無限ループ
void loop() {
}//loop




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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?