Python does nothing on mBlock, blocks work fine


#1

Hello, just got my mBot2. I can connect it via bluetooth and execute blocks in live mode from the browser IDE (Chrome).

I want to use python in the python tab, but SEND does nothing, not even a simple output to the console like print(“Hi!”), much less sending any commands to cyberpi. (There is no orange RUN button as I see in other threads.)

I’ve been through hours of troubleshooting, I have also downloaded the desktop version for Mac and it’s the same thing.

Can you please give me some tips how I get Python to work (or even do anything!) from the mBlock browser or Mac desktop app?

Thank you!


#2

@mnaylor375 If you write a code in Python for the CyberPi, you have to switch to upload mode and upload the code (make sure that you are on the Python tab while doing this, or the Block code is uploaded instead).
You can also use https://python.mblock.cc for a better experience (or the mBlock PC Python editor).


#3

Oh, I see – I have to switch mode to Python in settings. The “editor” in the python tab does nothing? But in settings I can click on “Python editor - GO TO” and this takes me to an editor that works.

I think this is really poor design. I used a whole day struggling with this and had begun using VS Code which is a step up in complexity. Glad to have it working. Thanks for the clues!


#4

No problem. :+1: