Using more than one Mote Controller

I’m starting a project to add lightning to my living room, and I was going to have Raspberries all over the place with Mote pHAT’s, but I realized since the Mote Controller uses one USB port for data and one for power, that I could just use longer USB data cables and power the Mote Controllers where I need them.

Is it possible to use more than one Mote Controller on a Raspberry Pi, and if so, is there a limit on how long the USB data cable can be?

You can absolutely use more than one on a pi! Not sure about cable length though. What is your planned length?

Cool, and thanks for the fast answer. I was thinking one Mote pHAT and two of them USB ones. Maximum length will be around 4-5 meters

I think that should work!

Thanks, time to get some more gear then! :)

Today I made some progress, managed to get the pHAT and controller to work at the same time on my rpi3 with the rainbow demo. Silly me wondered why it wouldn’t work at first, until I realized that the pHAT uses another library :D

Just a fast question while I’m waiting to order another USB controller. Is it as easy to activate more channels when using one more, or will they be mirrored with channels 1-4? It doesn’t really matter in my case since they will always be the same color though.

you should be able to probe the serial devices available over USB and instantiate a class object for each port.

see for more details (and an example), under ‘create a class instance’.

Alright cool, got it to work with a named port_name now. The documentation talks about a /dev/tty.usbmodem1234, but there were no such thing as tty.usbmodem in my /dev. Instead I found something else that I guessed was a similar thing that worked, namely /dev/ttyACM0. Wondering if Raspbian has changed since the documentation was written perhaps? :)

Anyway, so my instance in this case ended up being as follows.

mote = Mote(port_name=’/dev/ttyACM0’)

At this point I’m just guessing that the next will end up being /dev/ttyACM1, but unfortunately I can’t test it until next year. I’ll be sure to send an update when that happens though, thanks for the help so far :)

the device naming depends on a number of factors, not least the platform… mote is definitely a piece of kit we sell and market (to an extend anyhow) beyond Raspbian or the Pi.

The easiest way to figure out what the correct port name to use is would be to ls /dev with and without Mote attached.

A suggestion - how about making the Pimoroni Mote library hide the complication when there is more than one Mote controller by using channel number 5-8 to mean 2nd Mote etc.
Would still need some calls to tell Mote library which Mote is which in the order but otherwise would be pretty transparent to calling code.