BrickPi3 icon indicating copy to clipboard operation
BrickPi3 copied to clipboard

Inital commit for Rust library. WiP

Open jhelovuo opened this issue 7 years ago • 3 comments

This is a driver implementation for the BrickPi3 in the Rust programming language. Still somewhat a work in progress, but the two bundled examples are tested to work.

jhelovuo avatar Nov 28 '17 06:11 jhelovuo

Really cool and thanks for the PR @jhelovuo ! No one on our team has any experience with Rust; can you link a good getting started guide so we can test this out?

johnisanerd avatar Nov 28 '17 12:11 johnisanerd

Hi @johnisanerd, I used https://www.rust-lang.org/en-US/ docs to study Rust.

Quick test instructions to replicate my tests:

  • Use e.g. Raspbian Linux on Raspberry Pi
  • Install current Rust tools from rust-lang.org by the default install instructions given there. This should give you rustc and cargo commands.
  • cd BrickPi3/Software/Rust/brickpi3
  • cargo build will fetch the dependencies and build the library
  • cargo build --example info should build the "info" example, which is similar to the C++ version. Executables are produced in target/debug/examples by default.
  • cargo build --example motors should give a working "motors" example program.
  • Sensor code is completely untested. It may work by accident.

jhelovuo avatar Nov 28 '17 18:11 jhelovuo

Recent improvements:

  • Fixed build "script" to build successfully also on Raspbian with latest stable rustc (1.22.1)
  • Tested devices: -- motors, including encoders -- EV3 IR remote -- EV3 color sensor
  • added example program sensors_ev3 to test sensors Currently I have only the hardware included in the base EV3 kit, so I need more sensors to test if they work.
  • rebased some commits to simplify history

jhelovuo avatar Dec 10 '17 19:12 jhelovuo

No one has any experience with Rust, but we do appreciate the support. It took forever to get this in! My apologies. @jhelovuo

CleoQc avatar Dec 06 '22 16:12 CleoQc