# REPL in MU Editor using Microbit

**URL:** <https://forum.core-electronics.com.au/t/repl-in-mu-editor-using-microbit/16237>\
**Category:** micro:bit\
**Created:** [27 January 2023 05:11 UTC](https://forum.core-electronics.com.au/t/repl-in-mu-editor-using-microbit/16237 "2023-01-27T05:11:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jim38408](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@Jim38408](https://forum.core-electronics.com.au/u/Jim38408)\
**Post date:** [27 January 2023 05:11 UTC](https://forum.core-electronics.com.au/t/repl-in-mu-editor-using-microbit/16237/1 "2023-01-27T05:11:27Z")

</div>

Running MU Editor on Windows 11. Installed Python 3.8 as this was stated to be a suitable MU version.  
I can write and flash micropython programs on to a microbit (V1 or V2) and they run ok. When I try to then use the REPL for micropython commands it is very fragile. I can, say, run a basic sum ok or print statement but after completion it stops until I restart the REPL window then again the same thing. I tried connecting to micropython REPL using Putty with no success at all. If I run in command window F:\>mode it write that the baud rate to be 9600? not 115200 as expected - I have tried both in Putty, no help.

When I connect the same microbit to a Mac using MU Editor all is fine. So it seems it is some windows issue/setting. I have allowed the MU app through the firewall, still no luck.  
Now at a point where I at a loss to see what is causing the problem.  
It needs to be a straight forward process for my students otherwise “boom”  
Thanks for any advice,  
Jim

---

<div class="post-metadata">

**Author:** ![Liam](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/liam/32/3562_2.png) [@Liam](https://forum.core-electronics.com.au/u/Liam)\
**Post date:** [27 January 2023 05:44 UTC](https://forum.core-electronics.com.au/t/repl-in-mu-editor-using-microbit/16237/2 "2023-01-27T05:44:31Z")

</div>

Welcome back Jim!!

Would it be possible to send through a photo of the REPL in Mu before and after sending a command?

When testing in PuTTY do you first make sure that the COM port is released by Mu?  
If you have another micro:bit and computer on hand it might be worth testing if you see the same behaviour (this would rule out the USB-UART drivers).

It might also be worth giving Thonny a go, personally I find Mu to abstract a few features away when testing out new hardware, Mu is definitely the pick for students once we figure this out!

Let us know how you go!  
Liam

---

<div class="post-metadata">

**Author:** ![Jim38408](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@Jim38408](https://forum.core-electronics.com.au/u/Jim38408)\
**Post date:** [28 January 2023 03:20 UTC](https://forum.core-electronics.com.au/t/repl-in-mu-editor-using-microbit/16237/3 "2023-01-28T03:20:50Z")

</div>

Hi Liam

 ![Device Manager - Circuit Playground Connected](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/e/e86e5b48529af2682f9e39937d67d34b15f479b7.jpeg)  
 ![Mu Circuit Express Bootloader Hangs](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/5/5620f0f12223fea56b8dc86401738a0df7effaf2.jpeg)  
 ![Mu Restart REPL](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/0/0ace4748e5ca0810421a838da2faf3990cd518b5.jpeg)  
 ![Mu Startup message](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/0/01e0f9d713210b2476af4ae2e03e3e574838f3a3.jpeg)  
 ![Mu Startup with Circuit Express](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/7/751984e6a77bea101474ee11e8d3d844fa4edefb.jpeg)

With MU I have tried REPL on windows 11 with both a Microbit V1 and V2 - identical problem. With Mu on a Mac both ok. In Windows it seem to take sometime to recognise the Microbit and show the drive.

When I select/reselect REPL in MU in Windows sometimes no response to typing sometimes a little then nothing occasionally will be able to carry out a print statement then nothing. It seems like something is causing an interupt. I will keep looking to see what programs/services I have maybe causing this - I saw on the Adafruit site that “auto-reload” may cause this:  
“Some utility programs, such as backup, anti-virus, or disk-checking apps, will write to the CIRCUITPY as part of their operation. Sometimes they do this very frequently, causing constant restarts”

I tried with a Circuit Playground Express. Again problems recognising the device. When I reset to boot and tried to update the bootloader by dragging the file over it just hangs and difficult to cancel the operation.

“Some utility programs, such as backup, anti-virus, or disk-checking apps, will write to the CIRCUITPY as part of their operation. Sometimes they do this very frequently, causing constant restarts”  
I have attached some representative files.  
Many thanks for your assistance  
Jim

---

<div class="post-metadata">

**Author:** ![Jim38408](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@Jim38408](https://forum.core-electronics.com.au/u/Jim38408)\
**Post date:** [29 January 2023 03:25 UTC](https://forum.core-electronics.com.au/t/repl-in-mu-editor-using-microbit/16237/4 "2023-01-29T03:25:11Z")

</div>

Hi Liam,

It seems I have found the source of the problem (all fingers crossed) after far too much frustration and Googling.

I stopped and set the WDDriveService (Western Digital) to Manual  
WD Drive Manager Properties  
Service Name: WDDriveService  
Display Name: WD Drive Manager  
Decscription: Provides discovery of WD Drives  
Path to executable: “C:\Program Files (x86)\Western Digital\WD Drive Manager\WDDriveService.exe”

Started MU Editor up and the REPL working as expected.  
Issues associated with Circuit Playground Express and Putty also resolved.

I have now uninstalled WD Utilities. For what I need with my external HD’s its not warrented.

Hope this may help others.

Regards,  
Jim

---

<div class="post-metadata">

**Author:** ![Jim38408](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@Jim38408](https://forum.core-electronics.com.au/u/Jim38408)\
**Post date:** [31 January 2023 04:40 UTC](https://forum.core-electronics.com.au/t/repl-in-mu-editor-using-microbit/16237/5 "2023-01-31T04:40:04Z")

</div>

Hi Liam,

I entered the message below in the topic. So far so good.

Will have a look at Thonny.

Thanks again for your help.

Jim

 ![4055C23907A14BAE8BE84B40A0229A31.png](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/7/7e4f006e600be0e52228c99518845515fe779e3e.png)
