Program mBot with Arduino IDE

To program mCore with C/C++, you need Arduino IDE (click here to learn about Arduino). You may install Arduino IDE referring to the steps below:

  1. Download and install the corresponding Arduino IDE.
  2. Download and install the CH340 driver required by mCore(restart your computer after the installation is done).

CH340 for Windows

CH340 for MacOS

  1. Open Arduino IDE, refer to the documentation to download and configure the makeblock-library files.
  2. Then we start to debug the communication between arduino IDE and mCore with sample code Blink. Connect your mCore to computer with an official USB cable, and open the example Blink, then select the right board(it should be Arduino Uno) and COM port.
  • Make sure the mCore is powered on and disconnected from other software.

2.png

1.png

  1. For a more obvious result, you may modify the program (modify the parameter from 1000 to 100), and then upload the program.

3.png

  1. When the uploading is done, the L light on mCore is expected to be blinking as below gif shows.

4.gif

  1. After confirming the communication is OK, we start programming the electronic modules with Arduino IDE.
  • Here we take RGB LED module as an example, firstly we open the example ColorLoopTest.

5.jpg

  • Connect the RGB LED module to mCore, make the following modifications: "MeOrion.h" to "MeMCore.h", port to the actual one.

6.jpg

  • Then upload the program. After the program is uploaded successfully, program effect is expected as below.

7.gif

Was this article helpful?
1 out of 1 found this helpful

Comments

0 comments

Please sign in to leave a comment.