Release v0.2.0
rust_gpiozero now uses Rust 2018 edition and rppal for gpio access
-
input_devices
-
InputDevice changes:
pinis nowu8newconfigures device with the pin pulled to low by default- Added
new_with_pullup: create InputDevice with the pin number given with the pin pulled high with an internal resistor by default valuereturns abool
-
DigitalInputDevice changes:
pinis nowu8newconfigures device with the pin pulled to low by default- Added
new_with_pullup: create InputDevice with the pin number given with the pin pulled high with an internal resistor by default valuereturns aboolwait_for_inactivetakes an argumenttimeout(Option)wait_for_activetakes an argumenttimeout(Option)
-
Button changes:
pinis nowu8newconfigures device with the pin pulled tohighby default- Added
new_with_pulldown: create InputDevice with the pin number given with the pin pulled low with an internal resistor by default valuereturns aboolwait_for_inactivetakes an argumenttimeout(Option)wait_for_activetakes an argumenttimeout(Option)
-
-
output_devices
-
PWMOutputDevice (New)
- A generic output device configured for software pulse-width modulation (PWM)
- Values can be specified between 0.0 and 1.0 for varying levels of power in the device.
-
PWMLED (New)
- Represents a light emitting diode (LED) with variable brightness.
- Values can be specified between 0.0 and 1.0 for varying levels of brightness.
-
Servo (New)
- Represents a PWM-controlled servo motor connected to a GPIO pin
-
OutputDevice changes:
pinis nowu8- Added
active_high: When True, the value property is True when the device's pin is high. When False the value property is True when the device's pin is low (i.e. the value is inverted). - Added
set_active_highto set the state foractive_high
-
DigitalOutputDevice changes:
pinis nowu8- Added
active_high: When True, the value property is True when the device's pin is high. When False the value property is True when the device's pin is low (i.e. the value is inverted). - Added
set_active_highto set the state foractive_high - Added
blinkto make the device turn on and off repeatedly in the background. - Added
set_blink_countto set the number of times to blink the device - Added
waitwhich blocks until background blinking process is done
-
LED changes:
pinis nowu8- Added
active_high: When True, the value property is True when the device's pin is high. When False the value property is True when the device's pin is low (i.e. the value is inverted). - Added
set_active_highto set the state foractive_high blinknow takesf32foron_timeandoff_time.- Added
set_blink_countto set the number of times to blink the device - Added
waitwhich blocks until background blinking process is done - Added
is_litwhich returns True if the device is currently active and False otherwise.
-
Buzzer changes:
pinis nowu8- Added
active_high: When True, the value property is True when the device's pin is high. When False the value property is True when the device's pin is low (i.e. the value is inverted). - Added
set_active_highto set the state foractive_high - Added
beepto make the device turn on and off repeatedly in the background. - Added
set_beep_countto set the number of times to beep the device - Added
waitwhich blocks until background beeping process is done - Removed
blinkmethod
-
Motor changes:
forward_pinandbackward_pinare nowu8- Added
set_speedmethod: Useset_speedto change the speed at which motors should turn. Can be any value between 0.0 and the default 1.0 (maximum speed)
-
-
device
- Renamed
GPIODevicetoGpioDevice
- Renamed