Upload Sketch for BiBoard
This chapter is for Advanced users with programming experience.
Last updated
Was this helpful?
This chapter is for Advanced users with programming experience.
Last updated
Was this helpful?
The specific parameters of each functional module of BiBoard, please refer to of the BiBoard Quick Start Guide.
For details, please refer to of the BiBoard Quick Start Guide.
Append a line of code at the end of the file:
Please refer to the option list to set up the board's upload speed, CPU frequency, etc.
There is a setting for the Flash Size and Partition Scheme among the options. For more information, refer to the next section.
The BiBoard uses an ESP32 with a 16 M flash. To simplify, you can use the default 4 MB partition map without a problem. There's plenty of programming space for the standard OpenCatEsp32 firmware.
You can use the default 4MB with spiffs. You can also use other partition schemes under the 4 MB flash limit, such as "No OTA" or "Huge APP".
If you download the Zip file of the codes, you will get an OpenCatEsp32-main folder after unzipping. You need to rename it to OpenCatEsp32 before opening the OpenCatEsp32.ino, so that the two names match.
No matter where you save the folder, the file structure should be:
There are several testX.ino codes in ModuleTests folder. You can upload them to test certain modules separately. Open any testX.ino sketch with prefix โtestโ. (I recommend using testBuzzer.ino as your first test sketch)
Set the serial port in the Arduino IDE:
Modify the device type macro definition in BiBoard.ino according to the device type.
After the modification is completed, you can click the upload button to upload BiBoard.ino, and the changes in the program will be automatically saved.
If you want a factory reset, please connect the BiBoard and the computer via USB type-C data cable, and open the serial monitor. You can find the button either under Tools, or at the top-right corner of the Arduino IDE.
Set the serial monitor as 115200 baud rate and no line ending.
Input the serial command '!' and press Enter in the serial monitor to start over. You will see several questions:
Input 'Y' to the question, which means resetting all servo corrections to zero.
Input 'Y' to the question, which means calibrating the MPU6050, i.e. the gyro/accelerometer sensor.
Put the BiBoard FLAT on the table, and don't touch it during calibration.
Sometimes, the program could halt at the connection stage. You can close the serial monitor and reopen it, or press the reset button on BiBoard, to restart the program.
The program starts calibration after playing the melody 6 times.
Input 'n' and press Enter to continue.
The details of serial port printing information are as follows๏ผ
After the IMU calibration is completed, every time the robot is powered on, it will enter the regular power-on program.
long-press the button which is on the battery and boot up the robot with one side up, it will enter the calibration state automatically. The picture below shows the upper legs and lower legs installed after the robot enters the calibration state.
If you power on the robot and it is upright (with its back upward), the robot will start from the "rest" posture (fold the legs and unlock the servos).
The default code runs the Standard mode (including the Voice command function). If you have some extensible modules, you may uncomment the definition of a specific module. It will disable the Gyro code to save some programming space and activate the demo of the module.
The behavior of the official modules is defined in separate header files in OpenCat/src/. You can find them in OpenCat/src/io.h -> readSignal(). The behavior of OTHER_MODULES is defined in OpenCat/OpenCat.ino -> otherModule(). You can study the example code to write your own functions.
The BiBoard has built-in Bluetooth, and you can connect it with the new Android app:
You can check the update history and added features in ChangeLog.md (BiBoard\ChangeLog.md)
If you want to fully utilize the 16 MB flash of BiBoard (it's unnecessary and takes a longer uploading time), you can read the user manual for .
Download the โOpenCatEsp32 repository from GitHub: .Itโs better if you utilize GitHubโs version control feature. Otherwise, make sure you download the WHOLE OpenCatEsp32 FOLDER every time. All the codes have to be the same version to work together.
You may need to install for the CP210x chip.
Modify the motherboard model macro definition in BiBoard.ino according to .
Please refer to and for the complete calibration process.