Shop OBEX P1 Docs P2 Docs Learn Events
Thonny micro:bit — Parallax Forums

Thonny micro:bit

Has anybody tried plugging in two microbit units and using Thonny to program them. I plan on having one microbit plugged into my Win 10 PC, which will be running all the. And I would like to be able to plug in another microbit unit to program that.

I tried, on another occasion, to open up two separate windows of Thonny, but that did not work. It seems like I will have to have a separate computer if I want to work the way I just described, unless there is another solution. Win 10 PC only.

Ray

Comments

  • @Rsadeika you can switch between microbits in Thonny and program one while they are both connected to a PC.

    All you have to do is switch COM port under --->> Tools -> Options -> Interpreter and in the Port drop down box select the com port connected to the microbit you want to work with.

    There are ways of connecting simultaneously depending on what you are trying to do.

  • dgatelydgately Posts: 1,621
    edited 2024-01-07 00:32

    @Rsadeika said:
    Has anybody tried plugging in two microbit units and using Thonny to program them. I plan on having one microbit plugged into my Win 10 PC, which will be running all the. And I would like to be able to plug in another microbit unit to program that.

    That's how I programmed my Micro:Bit radio example on two boards, here: https://forums.parallax.com/discussion/comment/1556753/#Comment_1556753

    Since I use the same code on both Micro:Bits, it was easy, just changing the port as Unsoundecode mentioned. You just need to save the code on each as main.py... If you have differeing code for each Micro:Bit, it gets a little confusing. You have to make sure that you close one board's main.py before opening & editing the other (they are both named main.py in order to get the programs to run on reset or rebooting). So, just beware of which one you are editing and saving onto the Micro:Bit. If your sources are different, do save a copy of both code files to your computer as well, with a more specific names (like: sendMsg-main.py & receiveMsg-main.py). I only run one of the Micro:Bits from Thonny's RUN button. The other runs on reset as I saved its main.py previously.

    dgately

  • RsadeikaRsadeika Posts: 3,824

    This morning I decided to start up my RPi 5, run Thonny, and plug in the micro:bit. Low and behold Thonny found the micro:bit and I was able to run some test programs. Not sure why it did not work for me the first time I tried it, must be magic at work. Now I will be able to place my RPi 5 remotely, and with the micro:bit plugged in, do some test radio code, when my Parallax order gets here.

    Ray

Sign In or Register to comment.