1
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?

[I2C]UNO3で「0」と「1」を交互にI2Cに出力する。(I2Cホストプログラム)

Last updated at Posted at 2025-08-07

結果

image_original(57).jpg

プログラム

  • オリジナルのへんな液晶(0x80に文字を送るとそのまま、表示する



//i2c_0_1_kougo_c0116_1


//インクルド
#include <Arduino.h>
#include <Wire.h>  //I2C


//初期化
void setup() {

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

}  //setup


//メインループ
void loop() {

  //'0'
  Wire.beginTransmission(0x80 >> 1);  //アドレス

  Wire.write('0');  //データ

  Wire.endTransmission();  //END

  delay(1000);  //1秒待つ


  //'1'
  Wire.beginTransmission(0x80 >> 1);  //アドレス

  Wire.write('1');  //データ

  Wire.endTransmission();  //END

  delay(1000);  //1秒待つ

}  //loop



1
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
1
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?