You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying some blocks and returned to micropython.
when i tried command uflash my-script.py i get error message Error flashing pongo.py to microbit: Unable to find micro:bit. Is it plugged in?
solution uflash my-script.py ~/Downloads
that creates a micropython.hex in ~/Downloads I just copied that using a GUI file manager to my microbit
but with this script now flashed to the micobit uflash my-script.py still fails
The text was updated successfully, but these errors were encountered:
Our company IT does not allow booting from removeable drive. Maybe a security mechanism alters a return value? Not sure...
I located following problem in uflash.py in find_microbit() function:
"if ctypes.windll.kernel32.GetDriveTypeW(path) != 2:" will fail because this function returns 1 on my Window10 company PC
1 DRIVE_NO_ROOT_DIR (The root path is invalid; for example, there is no volume mounted at the specified path.)
2 DRIVE_REMOVABLE (The drive has removable media; for example, a floppy drive, thumb drive, or flash card reader.)
I changed the line to
"if not ctypes.windll.kernel32.GetDriveTypeW(path) in (1, 2):"
I was trying some blocks and returned to micropython.
when i tried command
uflash my-script.py
i get error messageError flashing pongo.py to microbit: Unable to find micro:bit. Is it plugged in?
solution
uflash my-script.py ~/Downloads
that creates a
micropython.hex
in~/Downloads
I just copied that using a GUI file manager to my microbitbut with this script now flashed to the micobit
uflash my-script.py
still failsThe text was updated successfully, but these errors were encountered: