1)
From the “Getting Started” guide:
http://download.makeblock.com/mblock/docs/getting-started-with-mblock.pdf
In Scratch Mode, the robot or Arduino board must be connect to the computer in order to run the program. You can use Scratch blocks to create graphics or make games.
In Arduino Mode, the program is uploaded into the robot and the robot is run on its own. However, you
cannot use graphics from Scratch since the computer is no longer there.
Using Scratch mode isn’t all that fun since the robot must be tethered to the PC (not sure if this can be done via BlueTooth). But that mode would probably allow for larger programs.
For the Arduino mode and Arduinio IDE, the code gets stored in the board, which does limit the code size. Even more limiting is the variable space…globals are limited to 1K or so for the mCore board. Not sure about local variables.
2)
I used the Arduino IDE to program the mCore board in C/C++. I’m not sure of the memory sizes of the various boards. Here is a sample program I wrote which has the Remote Control, Line Follower, and also uses the IR sensors to enable the robot to roam around on a table without falling off the edges (use on a low table such as a coffee table on carpet as the robot WILL eventually fall off):
http://somedisassemblyrequired.com/index.php/2017/01/01/mbot-example-program
3)
You could use C code to communicate with the robot. You’d have to learn how the Scratch firmware communicates (it’s open source) and then write C code to run in the PC (server code) to send/receive commands to the Arduino (client). The PC code couldn’t be written in Arduino IDE – the resultant binary won’t run on a PC. You’d have to use a C compiler for the PC to make the server code. You could also write your own client code for the robot using the Arduino IDE instead of using the Scratch firmware. You would still have to write the PC server code for a C compiler specific to the PC.
4)
I use the Arduino IDE to program the mCore on the mBot.
Using Raspberry PI
My next project is to give the robot the ability to “learn” using neural networks. This code is NOT going to fit in the Arduino. I plan to use a Raspberry PI 3 for the thinking. The Arduino board will simply be a pass-through to control the outputs and inputs.
The PI has significant RAM and copious “disk space” in the form of an SD card. You can also program it in Java, which is nice because the Java will also run on the PC for testing.