Start the Arduino application by clicking its icon. The Arduino IDE has the following features:
Open Arduino Preferences, then paste the following URL into "Additional Boards Manager URLs" (if there are existing URLs in the field, separate them with a comma ","):
Open Boards Manager under Tools>Board. In the newly opened window, wait for the progress bar at the bottom to finish loading.
Enter "maix" in the search box, and install Maixduino(k210) by Sipeed. Make sure you select version 0.3.10 (the newest one). This is what it looks like after install is finished:
Close Boards Manager. Now you should see Sipeed Maix Bit-Mic Board under Tools>Board. Select it:
Now we want to change the burn baud rate. Maixduino provided two configurations for this board: 1.5 Mbps and 1 Mbps. However, both are too fast for our Maix Bit board. In practice, I find 500 kbps to be a reliable speed to write to the board. In order to change that, we have to modify the configuration file supplied by Maixduino.
As we are changing the configuration file, first quit Arduino. In your favorite text edior, open
/Users/<username>/Library/Arduino15/packages/Maixduino/hardware/k210/0.3.10/boards.txt (for macOS) or
C:\Users\<username>\AppData\Local\Arduino15\packages\Maixduino\hardware\k210\0.3.10\boards.txt (for Windows). Note: change <username> into your actual user name.
Starting from line 118, you should find configurations for burn baud rates for the Maix Bit-Mic board. Add the following lines:
Save the fie. Now launch Arduino again. You should see 500 kbps listed under Tools>Burn Baud Rate. Select it.
Then, select the correct serial port to communicate with the board. (it may have some different name depending on your PC):
Finally, choose k-flash under Tools>Programmer:
Open the Blink example under File>Examples>01.Basics:
Press the Upload button in Arduino to compile and upload the Blink program. You should see the LED next to the USB port blinking after Arduino is done uploading.
Now, look at the program code, and see if you can speed up the blink rate. Demonstrate your new blink rate to a TA.
Now, save your changed sketch. The system will require you to save the sketch in your own workspace, usually on your Z: drive. As a safety measure, you may want to back up your work to a thumb drive that you can use elsewhere.
Congratulations! You've just built and tested your first MAiX BiT application.
Open the basic_graphics.ino example program from Arduino.
Compile and load the sketch.
Read the example code and compare it to the results on the Maix Bit LCD. Modify the code to change the position and size of the elements shown. Refer to the following libraries for more information:
Adafruit GFX: https://github.com/adafruit/Adafruit-GFX-Library
Open the graphicstest.ino example program from Arduino.
Open Serial Monitor under the Tools menu. Make sure to choose the correct baud rate that matches the code.
Compile and load the sketch.
After the program starts running, check Serial Monitor for serial output. Look at the Maix Bit display. Find two screens (or animations) that are interesting to you. Find and read the code that draws them.