A safe, reliable and comprehensive wrapper around the vex-rt library that will never panic!
safe-vex
is an open-source community project. safe-vex
is neither endorsed by or affiliated with Innovation First, Inc. VEX and VEX Robotics are trademarks or service marks of Innovation First, Inc. safe-vex
is also not developed by the same developers at vex-rt rather it is an independant project.
you will need:
- A rust toolchain managed by
rustup
: - An
arm-none-eabi
toolchain gcc
andlibclang-dev
/libclang
- (optional)
libc6-dev
if rustc is throwing the error:
--- stderr
/usr/lib/arm-none-eabi/include/sys/reent.h:14:10: fatal error: 'stddef.h' file not found
thread 'main' panicked at /home/dev/.cargo/registry/src/index.crates.io-6f17d22bba15001f/vex-rt-0.15.1/build/main.rs:266:10:
Could not generate bindings.: ClangDiagnostic("/usr/lib/arm-none-eabi/include/sys/reent.h:14:10: fatal error: 'stddef.h' file not found\n")
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
- The
pros-cli
installed throughpip
then:
- Clone the
safe-vex
project template by running the following command:
git clone https://github.com/GreenChild04/safe-vex-template.git
- Enter the newly cloned directory
- Turn on and connect to the vex v5 brain
- Give permission to upload code to the robot with: (doesn't matter if this fails)
sudo chmod a+rw /dev/ttyACM0 || sudo chmod a+rw /dev/ttyACM1
- While connected to the v5 brain run:
cargo run --release
- Your robot should now be up and running :D
you will need:
docker
then:
- Clone the
safe-vex
project template by running the following command:
git clone https://github.com/GreenChild04/safe-vex-template.git
- Enter the newly cloned directory
- Build the docker image with:
docker build -t safe-vex-template
- Turn on and connect to the vex v5 brain
- Give permission to upload code to the robot with: (doesn't matter if this fails)
sudo chmod a+rw /dev/ttyACM0 || sudo chmod a+rw /dev/ttyACM1
- Run the docker container interactively with:
docker run -it --rm --device=/dev/$(ls /dev/ttyACM*) -v .:/project -v $HOME/.cargo/registry:/home/dev/.cargo/registry safe-vex-template
- Run
cargo run --release
in the docker container while connected to the v5 brain - Your robot should now be up and running :D