ESP-WROOM-02開発ボードをArduinoファームにして遊んでいるのですが、Wireライブラリ(I2C)に使うピンが分からなかったのでメモ
I2C通信のテスト。上記のVine動画で点灯しているのは、PCA9622DR搭載したLEDモジュール。Arduino用のソースコードままで動きました。
Arduino ESP8266のピン配列
Wire library currently supports master mode up to approximately 450KHz. Before using I2C, pins for SDA and SCL need to be set by calling Wire.begin(int sda, int scl), i.e. Wire.begin(0, 2) on ESP-01, else they default to pins 4(SDA) and 5(SCL).
Wire.begin(int sda, int scl)
Wire.begin(0, 2)
I2Cのピン設定は、変えられるそうです。
Comments are closed.