Skip to content

3.2 Code

Once you have uploaded your code using USB, you can use the Bluetooth module to connect wirelessly!

Step 1: Pair Bluetooth with Your Computer

1. Power your robot using the battery case.

2. Open Bluetooth Settings on your computer.

3. Click Add Device and select HC-05 (or HC-06).

4. Enter the password: 1234 or 0000.

Once paired, your computer will assign it a COM port.

Step 2: Check COM Port

1. Open Device Manager (Windows).

2. Click Ports (COM & LPT).

3. Look for something like: Standard Serial over Bluetooth (COM5). Remember that COM number!

Step 3: Connect in PictoBlox

1. Open PictoBlox and select Board → Arduino Uno.

2. Choose Upload Mode.

3. Click Connect and select the Bluetooth COM port you found in Step 2.

4. Click Connect. If successful, it will show Connected.

Step 4: Test Communication

Upload a simple movement code via the wireless connection (see 2.3 Basic Movement Forward for reference). If everything is correct, the robot will respond wirelessly!

[!IMPORTANT] Workflow Rule: 1. Always upload code using USB first. 2. Disconnect the USB cable. 3. Reconnect Bluetooth TX/RX pins (if removed). 4. Power the robot with the battery. 5. Connect via Bluetooth in PictoBlox.