mBots are coded with mBlock using scratch. mBlock3 will show you native Arduino C/C++ code.
The next step (actually easier than mBlock) is to use the normal Arduino C/C++ editor.
Once you have installed the Arduino integrated development environment (IDE) and the MBlock Library, you will see 20 or more code examples inside the IDE