#vex #v5 #serial #packet #protocols #devices #brain

vex-v5-serial

A library for communicating with VEX V5 Brains

5 unstable releases

0.2.1 Jul 17, 2024
0.2.0 Jul 16, 2024
0.1.0 Jul 12, 2024
0.0.2 Jul 12, 2024
0.0.1 Jul 11, 2024

#580 in Hardware support

21 downloads per month
Used in cargo-v5

MIT license

270KB
3.5K SLoC

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.

lib.rs:

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.

Dependencies

~0.5–30MB
~449K SLoC