Page 1 of 1

Running two Pico's from the same computer.

Posted: Fri Feb 12, 2021 9:48 pm
by oldgit
I want to use two Picos to operate an IR link from my house to my garden shed.
It would be very useful to have one instance of Thonny connected to Pico A and another instance to Pico B. I could then code both from my desktop and see the interactions in the two Thonny instances.
Ive connected two Picos to USB ports but the second gives an error message "Unable to connect to /dev/ttyACM0: [Errno 11] Could not exclusively lock port /dev/ttyACM0: [Errno 11] Resource temporarily unavailable"
Is it possible to create a new device /dev/ttyACM1, say , and connect the second Thonny and Pico B via this device?
Or is there some other method?
All help gratefully received :)

Re: Running two Pico's from the same computer.

Posted: Sat Feb 13, 2021 9:26 am
by fdufnews
Well, if you plug a second Pico to your computer it will appear as ttyACM1. This is an automatic feature the new device is created when the device is plugged in.
You can verify with a ls /dev/tty* in a terminal
After you plug the first Pico, ttyACM0 will be listed
After you plug the second one, ttyACM1 will be added to the list

Re: Running two Pico's from the same computer.

Posted: Sat Feb 13, 2021 10:49 am
by aivarannamaa
Thonny allows you to specify a specific port instead of detecting the port automatically. If you need two instances of Thonny, then there is an option to allow this at Tools => Options => General.

Re: Running two Pico's from the same computer.

Posted: Mon Feb 15, 2021 10:26 pm
by oldgit
Many thanks for the replies .. I'll try tomorrow

Re: Running two Pico's from the same computer.

Posted: Tue Feb 16, 2021 9:01 am
by oldgit
Tried it.. works ! Thank you.
At first I had both Picos plugged into a non powered USB hub. I found I had to plug one of them into one of my desktop ports directly then /dev/ttyACM1 appeared. :D