Using more than one Mote Controller


#1

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?


#2

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


#3

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


#4

I think that should work!


#5

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


#6

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.


#7

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

see http://docs.pimoroni.com/mote/ for more details (and an example), under ‘create a class instance’.


#8

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 :)


#9

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.


#10

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.