🔧
Burn Bootloader for NyBoard
If you cannot upload sketches to the NyBoard (the "not in sync error") and verify that the serial connection is all good, the NyBoard's bootloader might be crashed during the last upload.
Verify that the serial connection is all good means:
- 1.The USB cable has data wires rather than just the power wires. The USB cable included in the Petoi package should be good.
- 2.You have the proper driver for the uploader, or your computer can automatically install the driver. You can see and select the serial port in the Arduino IDE -> Tools -> Port.
- 3.All the contacts along the loop are connected firmly.
- 4.You have successfully uploaded sketches previously.
There could be several reasons why the NyBoard's bootloader crashes. Some of the common causes include:
- 1.Uploading the sketch at a high baud rate
- 2.Using a malfunctioning USB cable
- 3.Using a power source that is not sufficient
- 4.Using a low-quality or damaged Uno board
- 5.Disrupting the upload process by pressing the reset button or unplugging the board
- 6.Memory overflow
In the specific case of Petoi robots, the sketch size and errors in the code are major causes of the crashed bootloader. Uploading a sketch to the Uno replaces the existing bootloader code with the new sketch. If the sketch is too large to fit in the memory or if there are errors in the code causing memory overflow, the bootloader may corrupt.
- 1.Open the sketch ArduinoISP.ino.
- 2.Select the items in the menu bar Tools > Board (Arduino UNO) and Port that connect to the UNO board.
- 3.Upload the sketch ArduinoISP.ino to the UNO board.
- 4.Wire the UNO board with NyBoard.
- 5.Select the Arduino as ISP in the menu bar Tools>Programmer.
- 6.Click the menu Burn Bootloader.
At Step 6, you'd better push the jumpers with your fingers to ensure good contact.

Since the NyBoard uses the same chip as a regular Arduino Uno, if you have two Nyboards, you can use one as a programmer(upload the sketch ArduinoISP.ino) to burn the bootloader to another one as the target. The steps are similar to the above, but you need to assign the RESET pin to 6 in the ArduinoISP.ino as follows:
The jumper connection is as follows:


- USBtinyISP
Connect the USBtinyISP programmer and NyBoard. The pins connection map is as follows:
MI --> MISO V --> VCC
SC --> SCK MO --> MOSI
R --> Reset G --> GND
Connect the USBtinyISP programmer to the computer with a USB port. After installing the driver as follows:

The driver is as follows:
usbtinyisp_libusb_1.2.6.0.zip
305KB
Binary
With NyBoard V1_*, you can simply choose Arduino Uno under the Tool menu of Arduino IDE, then burn the bootloader as follows:

While Burning the bootloader, you'd better push the UsbtinyISP with your fingers to ensure good contact.

- USBasp
Connect the USBasp programmer and NyBoard. The pins connection map is as follows:
MISO --> MISO VCC --> VCC
SCK --> SCK MOSI --> MOSI
Reset --> Reset GND --> GND
Connect the USBasp programmer to the computer with a USB port. Afer installing the driver as follows:

The driver installer is as follows:
zadig-2.8.zip
5MB
Binary
With NyBoard V1_*, you can simply choose Arduino Uno under the Tool menu of Arduino IDE, then burn the bootloader as follows:

The socket from the USBasp programmer to ICSP on NyBoard is not compatible. In this case, You need to use female-to-male jumper wires to connect the pins on each side as follows (It's a one-time operation, so there is no need for soldering)

While Burning the bootloader, make sure they have good contact. You can press the jumpers slightly to ensure the connections.
For details about how to use the USBasp programmer, you can refer to: