7×15 matrix LED をArduino で使ってみる

最終更新日

安売りしてた 7×15 matrix LED を Arduino で使ってみた。

買った物

pimoroni で1個 £7.75 = 1,100円くらいだった。
通常価格 £9.3 だからお得だと思ってたけど、

https://shop.pimoroni.com/products/adafruit-15×7-charlieplex-led-matrix-display-featherwing

以下の本家サイトで $9.95 なので、本家サイトのほうが安いじゃん!

Adafruit 15×7 CharliePlex LED Matrix Display FeatherWing – Red

まあ、いいや。。

Arduino

3.3v 駆動なので、Arduino Nano(5v) は使いにくい。

こんなときはリッチな Spresense + 拡張ボードで試す。

https://developer.sony.com/develop/spresense/docs/introduction_ja.html#_spresense_拡張ボード

Jumperで、PINの電圧も 3.3v と5v 切り換えができるので、色々安心便利。

Arduino Driver の準備

以下のページの通り、Arduino のlibrary Package を追加していく。

https://learn.adafruit.com/adafruit-15×7-7×15-charlieplex-led-matrix-charliewing-featherwing/usage

大事なのは、examples のsource codeはそのままでは、うまく動かないこと。

// If you're using the full breakout...
Adafruit_IS31FL3731 ledmatrix = Adafruit_IS31FL3731();
// If you're using the FeatherWing version
//Adafruit_IS31FL3731_Wing ledmatrix = Adafruit_IS31FL3731_Wing();

購入したのは、 FeatherWing version なので、以下のように書き換える。

// If you're using the full breakout...
//Adafruit_IS31FL3731 ledmatrix = Adafruit_IS31FL3731();
// If you're using the FeatherWing version
Adafruit_IS31FL3731_Wing ledmatrix = Adafruit_IS31FL3731_Wing();

配線

LED 配線は、4本。VCC, GND, I2C用の2本(SDA,SCL)

  • LED Matrics (power)

PowerPins

  • LED I2C

I2C

  • Spresense I2C

Spresense の拡張ボードは、D15とD14を使用し、JP1は3.3vの位置に変更した。

Spresense 拡張ボードPINOUT

シェアする