Skip to content

Add set_servo and device_version

Latest
Compare
Choose a tag to compare
@Hermitter Hermitter released this 09 Mar 21:18
· 4 commits to master since this release
  • Added set_servo, as a PWM helper function, to easily control servos.
    // Example: move the servo at pin 3 to a 90 degree angle
    gpio.set_config(3, Function::Pwm).unwrap();
    gpio.set_config(3, Mode::Output).unwrap();
    gpio.set_servo_angle(3, 90, 0.7).unwrap();
  • The Bus struct now has a new property called device_version. Currently unused for anything meaningful.