That’s some fantastic work!
To add a second Mote pHAT you’ll have to get a little bit creative with both the hardware and software side of things.
First up, you’ll need to write the Mote pHAT manually onto the Pi header- make sure to make all the power/ground connections, plus BCM 10 (Data) and BCM 11 (Clock) as normal. Then you need to find 4 free pins to wire up the Mote pHAT’s Channel 1, 2, 3 and 4 connections.
You can use jumper jerky or soldered-on wire to jump those pins (BCM 8, BCM 7, BCM 25 and BCM 24) across to 4 other suitable pins on the Pi- maybe BCM 5, 6, 12 and 16 or any of your choice.
Next you’ll need to manually modify the library starting with this bit: https://github.com/pimoroni/mote-phat/blob/master/library/motephat/init.py#L18
This is the list of pins that Mote pHAT uses to switch each channel. Add your 4 extra pins here.
Then change NUM_CHANNELS = 4
to NUM_CHANNELS = 8
Finally change this awful bit of code:
pixels = [
[[0, 0, 0, DEFAULT_BRIGHTNESS]] * NUM_PIXELS_PER_CHANNEL,
[[0, 0, 0, DEFAULT_BRIGHTNESS]] * NUM_PIXELS_PER_CHANNEL,
[[0, 0, 0, DEFAULT_BRIGHTNESS]] * NUM_PIXELS_PER_CHANNEL,
[[0, 0, 0, DEFAULT_BRIGHTNESS]] * NUM_PIXELS_PER_CHANNEL
]
To reflect your 8 channels:
pixels = [
[[0, 0, 0, DEFAULT_BRIGHTNESS]] * NUM_PIXELS_PER_CHANNEL,
[[0, 0, 0, DEFAULT_BRIGHTNESS]] * NUM_PIXELS_PER_CHANNEL,
[[0, 0, 0, DEFAULT_BRIGHTNESS]] * NUM_PIXELS_PER_CHANNEL,
[[0, 0, 0, DEFAULT_BRIGHTNESS]] * NUM_PIXELS_PER_CHANNEL,
[[0, 0, 0, DEFAULT_BRIGHTNESS]] * NUM_PIXELS_PER_CHANNEL,
[[0, 0, 0, DEFAULT_BRIGHTNESS]] * NUM_PIXELS_PER_CHANNEL,
[[0, 0, 0, DEFAULT_BRIGHTNESS]] * NUM_PIXELS_PER_CHANNEL,
[[0, 0, 0, DEFAULT_BRIGHTNESS]] * NUM_PIXELS_PER_CHANNEL
]
Aaannnd… I think that’s it. You should be able to install your modified Mote library sudo setup.py install
and use it just like the old Mote pHAT library but with the addition of 4 extra channels.
Just knowing it’s possible should get you half way toward getting it up and running ;) If you get stuck, give me a shout.