Running two Pico's from the same computer.

RP2040 based microcontroller boards running MicroPython.
Target audience: MicroPython users with an RP2040 boards.
This does not include conventional Linux-based Raspberry Pi boards.
Post Reply
oldgit
Posts: 3
Joined: Fri Feb 12, 2021 9:28 pm

Running two Pico's from the same computer.

Post by oldgit » Fri Feb 12, 2021 9:48 pm

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

fdufnews
Posts: 35
Joined: Mon Jul 25, 2016 11:31 am

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

Post by fdufnews » Sat Feb 13, 2021 9:26 am

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

User avatar
aivarannamaa
Posts: 109
Joined: Fri Sep 22, 2017 3:19 pm
Location: Estonia
Contact:

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

Post by aivarannamaa » Sat Feb 13, 2021 10:49 am

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.
Aivar Annamaa
https://thonny.org

oldgit
Posts: 3
Joined: Fri Feb 12, 2021 9:28 pm

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

Post by oldgit » Mon Feb 15, 2021 10:26 pm

Many thanks for the replies .. I'll try tomorrow

oldgit
Posts: 3
Joined: Fri Feb 12, 2021 9:28 pm

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

Post by oldgit » Tue Feb 16, 2021 9:01 am

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

Post Reply