Firmware Uploader
This manual for Beginner. Makes it easier for you to get started with the robot(Nybble / Bittle ).
** Download the latest version of the Petoi Desktop APP. **
Petoi Desktop App works on both Nybble and Bittle controlled by NyBoard based on ATmega328P or Bittle X controlled by BiBoard based on ESP32. For NyBoard, more detailed documentation can be found at NyBoard V1_0, NyBoard V1_1, or NyBoard V1_2 (which is similar to NyBoard V1_1).
Connect the mainboard to the computer
NyBoard(for Bittle & Nybble)
Use the USB uploader for NyBoard.
For more details, please refer to the Connect NyBoard section in the USB uploader module for specific steps.

NyBoard Version
You can find the board version number on the NyBoard.
Notes:
Sometimes, if you cannot go through the bootup stage, such as repetitively printing "IMU" and restarting, you may have accidentally dialed the switch to the "RPi" side.
Before uploading the firmware, please ensure that no I2C device is connected to the I2C interface of the mainboard. Otherwise, the firmware upload will fail. The location of the I2C interface is as shown below (in the red box):
BiBoard(for Bittle X)
Use the USB type-C data cable for BiBoard

BiBoard Version
You can find the board version number on the BiBoard:

Upload the firmware with the Petoi Desktop APP
Download the latest version of the Petoi Desktop APP.
Open the PetoiDesktopApp
After properly connecting the USB uploader, open the PetoiDesktopApp (for Windows: UI.exe / for Mac: Petoi Desktop App), and select your Model and Language.
Menu bar in Petoi Desktop APP



Click the Firmware Uploader button


Select the correct options to upload the latest firmware
The 1.0 software won't work properly with the Joint Calibrator, the Skill Composer, and other APIs. Only use it when you want to use CodeCraft (a graphical coding interface by our partner, TinkerGen).
Software version
1.0
2.0 (default)
The 1.0 version will be obsolete.
Board version
NyBoard_V1_0 (default) NyBoard_V1_1 NyBoard_V1_2 BiBoard_V0_1 BiBoard_V0_2
Bittle X use BiBoard_V0_1 or BiBoard_V0_2
Product
Bittle (default) Nybble Bittle X
Mode
Standard (default) RandomMind Voice Mind+ Camera (Bittle) Ultrasonic (Nybble) RandomMind_Ultrasonic (Nybble)
Some modes are only available on a specific product and a board. The mode list will show only supported modes when you switch between products and boards. Note that Bittle X has random mind feature loaded by default. You don't need to upadte the mode on Bittle X.
Serial port
Auto detection or by manual selection.
You can find the correct one through unplug and replug the USB socket on the computer side
Uploading options
Factory Reset Our factory uses it to improve efficiency. However, it automatically resets all the parameters, including the calibration parameters of the servos and the IMU, so it's not recommended for regular users.
Upgrade the Firmware It will upgrade both the parameters and the main function.
It is mandatory if you just downloaded a new version of this desktop app.
Update the Mode Only If you have upgraded the firmware at least once after downloading a new version of this desktop app, you can switch between the modes without refreshing the parameters. It's faster by skipping the firmware upgrade stage.
Upgrade the firmware process for NyBoard
After clicking the Upgrade the Firmware button, the uploading process starts immediately. The status bar at the bottom will show the current progress in real time, as well as the results of key processes.
After the Parameters firmware has been successfully uploaded, the board starts to run the configuration program by itself. Some message windows will pop up in sequence for you to confirm or cancel:
Reset joint offsets? (Y/N)
Select "Yes, " and the program will reset all servo calibration parameters to zero. The status bar will update the corresponding process and result in real-time.
Select "No" to preserve the calibration value(so that you don't need to calibrate again if you have done so before).
Calibrate IMU? (Y/N)
Select "Yes, " and the program will calibrate the gyroscope (IMU) to balance the robot correctly. The status bar will update the corresponding process and result in real-time.
Select "No," and the program will skip this step.
Note:
Ensure the mainboard is positioned horizontally before clicking the "Yes" button.
When uploading this firmware version for the first time, click the "Yes" button!
When all the steps are completed, a message window will pop up showing "Parameter initialization complete!" You must confirm to proceed to the second round of uploading the main functional code.

Calibrate the servo controller chip PCA9685 on the NyBoard
When the above window pops up, there's an optional step to calibrate the servo driver before clicking OK. If later you find one of the servos stops working but can resume working after re-powering it, it's probably due to an inaccurate PWM driver signal. You must redo the previous uploading, and this step CANNOT be skipped.
This calibration makes the servo controller's (PCA9685 chip) angle signal more precise. Use a short jumper wire to connect the PWM pin 3 (the signal pin of one of the servo pins) and Grove pin A3 and steady the wire. It doesn’t have to be a dedicated jumper wire. Any thin metal wire, such as a straightened paper clip, can work as long as it can connect the pins.
The program measures the pulse width of the signal and automatically calibrates the chip after getting three identical readings successively. It usually takes less than 2 seconds. The board will beep three times to indicate the calibration is done. The calibration offset will be saved to the board for the next bootup. The process should be done at least once, and we have calibrated every board after October 2022. But you can still do it by yourself, just in case.
Finish uploading the firmware
After the upload, the status bar will update the corresponding result, such as the success or failure of firmware uploading. If the uploading is successful, a message window of "Firmware upload complete!" will pop up simultaneously.

If you have Arduino IDE programming experience
For NyBoard, you can refer to Upload Sketch For NyBoard.
For BiBoard, you can refer to Upload Sketch For BiBoard.
Last updated
Was this helpful?