Show Arduino code on mblock5 with mbot2


#1

Hello,

I am using a mbot2 with mblock5. When adding blocks I can see the generated python code, but is it also possible to see the Arduino C code ? I can’t find the C code view, whereas it seems it was possible with older version v3.4.11 of mblock with the first version of the mbot.

By the way, is it possible to use old version mblock v3.4.11 with a mbot2 ?

Thanks


#2

Hey, @Jeannop, Python and Arduino C are different, non-interchangeable coding languages. Arduino code cannot be converted to Python code, and vice versa.


#3

Hello, thanks for your feedback.

I understand that it is not possible to convert Python code to Arduino code and vice versa. But I have then two more questions when programming a mBot2 :

  • is it possible to convert blocks coding into Arduino code (without using Python code) ?
  • is it possible to program mBot2 directly in Arduino code (i.e. by editing direcly Arduino code) ? By the way, I was wondering if something could be done with Arduino IDE tool, but I don’t know if Arduino IDE tool provides support for mBot2.

Thanks again


#4

mBot 2 operates on Python only. To see Arduino C for similar blocks, add the “mBot” of “Arduino” device.
No, Arduino IDE does not support mBot 2 (mBot Neo).


#5

For my information, is there any plan to support mBot2 in Arduino IDE in the future ?

I am asking because my understanding is that mBot1 (mBot original version) is supported by Arduino IDE. And as mBot2 is based on the same Arduino Uno board as mBot1, I am a bit suprised that mBot2 is not supporting by Ardunio IDE. Or is there any technical reason which explains why mBot2 operates Python only ?

Thank you again


#6

mBot 2 is not planned to be supported by Arduino IDE. mBot 2 uses a controller board based on a Raspberry Pi, and can only be programmed using Python.


#7

mBot 2 uses ESP32-WROVER-B microcontroller (it can even be seen if you turn CyberPi upside down). Those microcontrollers do support Arduino C but it was Makeblock’s choice to make the OS running on controller support Python only.


#8

Thank you Bleky.

Then it would be maybe possible to program the mBot2 in Arduino C by using makeblock library under Ardunio IDE.


#9

@Bleky basically said that it is not possible…


#10

Correct, I know this is a really old thread but this is possible.
Could possible go and reverse engineer stuff from the pin out and create a arduino board or library……


#11

The question was

The answer to this is no, because mBot neo is a multitasking micropython based device. (There is no “C” for cyberpi). So while it is technically possible to generate an Arduino C equivalent, it is not possible to run Arduino C on cyberpi. @V205 @Jeannop @Bleky


#12

Apparently Makeblock actually made an Arduino SDK for CyberPi but it was all well hidden.

https://education.makeblock.com/help/cyberpi-series-open-source-materials/#articleTOC_11


#13

@Bleky @Jeannop Very interesting, thanks for sharing! I’ll have to experiment with this. :slight_smile: