# Line-following robot — hardware version V10

> This is a robot that follows a line. Multiple robots can share a track, communicate, and avoid collisions.

Canonical page: https://9o.at/products/r1/v10
Product code: R1. Hardware version: V10.

## Documents
- Schematic (PDF): https://raw.githubusercontent.com/tomrodinger/line_following_robot/main/PCB/V10/schematic.pdf
- Hardware design files on GitHub: https://github.com/tomrodinger/line_following_robot/tree/main/PCB/V10
- Python API reference (Markdown): https://9o.at/docs/python.md
- Arduino API reference (Markdown): https://9o.at/docs/arduino.md
- MCP server (drive the motor from an AI assistant): https://github.com/Gearotons/servomotor-mcp
- Store: https://gearotons.com/store

## Firmware
Newest first. Update with the browser tool at https://motor-maintenance.gearotons.com/ (Chromium browsers) or the Python tools in the repository.

| Version | Compatibility | Date | SHA-256 | File |
|---|---|---|---|---|
| 0.2.3 | 0 | September 9, 2021 | 43f6df3f42ae0582b1331c3ebc3eec1662dc2a7740039b04128bb06d5931dac9 | https://raw.githubusercontent.com/vladsomai/test_line_following_robot/main/Products/R1/firmware/0.2.3.firmware |
| 0.2.4 | 0 | September 2, 2022 | 42bc5b4df78ad032ab15f4badfa974cfbd40519554dcdd277b5994c3bcc4ed25 | https://raw.githubusercontent.com/vladsomai/test_line_following_robot/main/Products/R1/firmware/0.2.4.firmware |
| 0.2.5 | 0 | September 29, 2022 | b1374c3d764bb456661480f8d7fb871967202f30528dc16ed80daefd17b34945 | https://raw.githubusercontent.com/vladsomai/test_line_following_robot/main/Products/R1/firmware/0.2.5.firmware |

### Updating from the command line

Once per computer, run these two commands separately:

```sh
pip3 install --upgrade servomotor
```

```sh
servomotor_command -P
```

The second shows a numbered list of serial ports; type the number of the USB-to-RS-485 adapter and press Enter. The choice is saved, so no later command needs `-p`, and nothing is sent to the motor. Run it on its own: it reads its answer from the terminal, so inside a pasted block it would take the next pasted line as its answer. For scripts, pass `-p <PORT>` or set `SERVOMOTOR_PORT` instead; either overrides the saved choice.

Then, for each upgrade:

```sh
# Download the firmware file into the current folder.
curl -LO https://raw.githubusercontent.com/vladsomai/test_line_following_robot/main/Products/R1/firmware/0.2.3.firmware
# Update every motor on the bus that this file is for. Motors of another
# model or compatibility code ignore it and keep their firmware.
upgrade_firmware 0.2.3.firmware
# Check the result: the Firmware Version column should show the new version
# for every motor. The upgrade itself cannot tell you whether it worked.
show_device_information_for_all_devices
```

This updates every motor on the bus that the file is for; motors of another model or firmware compatibility code ignore it and keep their firmware. No motor answers during a broadcast transfer, so upgrade_firmware reports every page as written whether or not it was: the final `show_device_information_for_all_devices` is the real check, and its Firmware Version column should show the new version for every motor. If it stops with "Communication error" instead of printing its table, a motor is probably still in its bootloader (its green LED blinks fast); run the upgrade again. To update only one motor, use the browser maintenance tool at https://motor-maintenance.gearotons.com/ — press Firmware on that motor's row; it flashes only that motor, leaves the rest of the bus alone and reads the version back — or add `-a <ALIAS>` to the upgrade command. The command-line tool reboots the whole bus into its bootloader during the transfer, even with -a. An interrupted upgrade cannot brick a motor, and the alias and calibration survive.
