Translate from block to Python feature not working?


#1
  1. I just bought an mbot2. I cannot find the block to python converter. I use block code but when I click on the python tab, the space is blank.

  2. def on_start() does not work. Looks like there’s something wrong with @event.start

  3. When uploading code, errors are not displayed in the software mblock but instead gets uploaded onto the robot where cyberpi displays the error, I tried to delete the buggy program but there is no easy way to do so. Frustrated, I updated firmware and randomly try to “reset”. Luckily I got back the factory reset. I actually do not know what I did that reset the robot. A simple delete program would have helped. How exactly do we get a factory reset?

Thanks in advance.
Ivy


#2

@ivorymoose
The Python tab is the wrong place to look. That’s where to code the device with Python.
If you want to see the equivalent of your blocks in the base coding languages, you usually would click this button on the side:
image

However, it is disabled for some devices. For some reason, mBlock disabled it for CyberPi in the latest version. I don’t know why. So until they enable it again or do something else there, there’s not an easy way to see the Python code.


#3

Hello Best_codes, thank you for the response.

Alas, I am still not able to make the event module work in mBot2. I even went into Github to try and find a solution. I am guessing that the new version of Python does not work with mBot2 but I may be wrong. I tried to not use the event module. It is strange the event.start does not work.