# Need some help expanding my Mote

**URL:** <https://forums.pimoroni.com/t/need-some-help-expanding-my-mote/6160>\
**Category:** Support\
**Created:** [October 18, 2017, 11:27am UTC](https://forums.pimoroni.com/t/need-some-help-expanding-my-mote/6160 "2017-10-18T11:27:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sh4z](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/sh4z/32/3257_2.png) [@sh4z](https://forums.pimoroni.com/u/sh4z)\
**Post date:** [October 18, 2017, 11:27am UTC](https://forums.pimoroni.com/t/need-some-help-expanding-my-mote/6160/1 "2017-10-18T11:27:55Z")

</div>

Hi guys,

Last month I ordered and installed a Zero with a Mote pHat and 4 strips of led’s under my stairs, [this is the result](https://photos.app.goo.gl/HsvbwswdHQCDm9fz1).

Now I would like to expand the amount of led strip to 8. I suppose I can connect a Mote Host via the usb port and add 4 extra LED strips. The question is, what do I need to add or change in the code to get it all to work?

Is it as easy as adding an extra library and extend the range of channels from 4 to 8?  
I found some info by searching the forums but it was not entirely clear to me.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [October 19, 2017, 12:15pm UTC](https://forums.pimoroni.com/t/need-some-help-expanding-my-mote/6160/3 "2017-10-19T12:15:13Z")

</div>

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/](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:

```python
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:

```python
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.

---

<div class="post-metadata">

**Author:** ![sh4z](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/sh4z/32/3257_2.png) [@sh4z](https://forums.pimoroni.com/u/sh4z)\
**Post date:** [October 19, 2017, 2:26pm UTC](https://forums.pimoroni.com/t/need-some-help-expanding-my-mote/6160/4 "2017-10-19T14:26:26Z")

</div>

Ok thanks! :D Great info!

So you think it’s better I use an extra pHat instead of combining it with a Host module? Or is that combination not possible hardware-wise or maybe codewise?

---

<div class="post-metadata">

**Author:** ![gadgetoid](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/gadgetoid/32/13_2.png) [@gadgetoid](https://forums.pimoroni.com/u/gadgetoid)\
**Post date:** [October 19, 2017, 3:39pm UTC](https://forums.pimoroni.com/t/need-some-help-expanding-my-mote/6160/5 "2017-10-19T15:39:30Z")

</div>

You could certainly use Mote Host, and you can use both libraries side-by-side, but you’d have to use a USB hub or adaptor to hook it up to a Zero. It could well be the easier choice if you don’t want to do any creative wiring and library modification.

---

<div class="post-metadata">

**Author:** ![sh4z](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/sh4z/32/3257_2.png) [@sh4z](https://forums.pimoroni.com/u/sh4z)\
**Post date:** [October 20, 2017, 6:57am UTC](https://forums.pimoroni.com/t/need-some-help-expanding-my-mote/6160/6 "2017-10-20T06:57:21Z")

</div>

Oke thanks, I think ill try to figure out how to connect a second pHat, that way it’s more fun and a challenge, plus I want to keep the amount of cables to a minimum :)
