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?

Digisparkもどき - i2c LCDプログラム書き換え編

Posted at

 Digisparkもどき - i2c LCD作成(master&slave)で動作チェックできたので、本格的にプログラムを書き換えました。
 LCD_I2Cです。master用は同じ名前のLCD_I2CフォルダーをArduino IDEの自分のライブラリーフォルダーにコピーしてIDEを再起動します。slave用に必要なShiftLCD_Fixedも同様にインストールします。slave用のプログラムは、LCD_I2CSlaveフォルダーのLCD_I2CSlave.inoです。
 masterとslave間のプロトコルは、
キャラクタLCDモジュール I2C化アダプタなどで紹介されているものにしました。秋月電子でもこのプロトコルのI2C-LCDがあるようです。
 ピンが足りないので、元々バックライトon/off回路はつけていなくて、バックライトon/off機能は動きません(無視される)。
 examplesのCustomCharsもちゃんと動きます。slave側のデバッグ時に有用なSlaveDebugも用意しました。master側から繰り返しデータを送るのでslaveをあとから起動しても表示されます。

TODO

  • LCD、シフトレジスタ、I2Cピン、Digisparkもどき用ピンをのせた基板を作る。attimy85ものせればスッキリしますが、Digisparkもどきを使うのが目的なので。両面基板がいりそうで、自作できないかも。
  • 秋月電子からこのプロトコルのLCDを買い、同じmasterプログラムで動作するか試す。
  • slaveがRaspberry Piから使えるか試す。
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?