#vex #packet #brains

vex-v5-serial

A library for communicating with VEX V5 Brains

11 unstable releases (3 breaking)

0.3.3 Feb 6, 2025
0.3.2 Jan 25, 2025
0.3.1 Dec 19, 2024
0.2.3 Dec 8, 2024
0.0.2 Jul 12, 2024

#307 in Hardware support

45 downloads per month
Used in 2 crates

MIT license

275KB
3.5K SLoC

Crate for interacting with the Vex V5 Robot brain. Not affiliated with Innovation First Inc.

This crate is structured around two key traits: Encode and Decode. These traits are used to encode messages to be sent to the brain and decode messages received from the brain. All packet types in this library have either an Encode or Decode implementation.

Because manually sending and receiving packets is a chore, this library also provides high level Commands. These commands provide easier ways to perform complicated tasks, such as uploading a program.


VEX V5 Serial Protocol

image

This project provides a Rust implementation of the serial communications protocol used by VEX V5 devices over USB and Bluetooth.

Note

Information regarding the protocol is derived from the open-source PROS-CLI project as well as JerryLum's reverse engineering efforts in v5-serial-protocol.

Features

  • Asynchronous USB and Bluetooth LE support.
  • Most CDC and CDC2 (extended) command packets implemented.
  • Command API for higher level abstractions over basic packet exchange.

Dependencies

~0.4–29MB
~416K SLoC