Releases: berndporr/pyFirmata2
2.5.1
Callback-only library now
Attempts to do polling of inputs have already been generating warnings for the last 3 years that this has been deprecated. This behaviour has now been changed to raising an exception. Thus any read() which is on an input will raise an exception.
PWM & servo demos
Demos for PWM and servos have been added.
The documentation of the Pin class has been extended and improved.
Also the read command from the Pin class will generate a warning when reading from a digital or analogue input pin urging the user to use an event handler instead.
Callbacks for digital inputs
The digital inputs now also have callback functions which are called whenever there is a state change at a digital input. Also the blink example has been changed to a timer based approach.
This release got rid of any legacy delay/loop code and it's now 100% event driven.
Pullup support
There is now also an option to enable the pullup resistor on a digital pin by specifying 'u' instead of 'i'. Thanks, @benjie-git for submitting a pull request adding this feature.
Max 1kHz sampling rate
The firmata sketch allows now up to 1kHz. I've removed the 100Hz limit so that the sampling interval can be called with down to 1ms. However, it's highly recommended to check if the sampling rate can be actually achieved.
Windows bugfix release
@gastonfeng pointed out that sometimes the serial driver won't populate .vid so the autodetect function won't find the serial port. That's been changed to .device which is def set by the serial driver.
It's all about callback handlers
pyfirmata2 has been designed to guarantee a precise sampling rate via a callback handler and is not using loops with delays. The pass_time
function is not needed by the user and has been made private.
Minor update of the documentation
This update just adds a link to the Digital Signal Processing class which has used this module extensively last term. Students had to filter an analogue signal of their choice.
See this playlist for examples.
Major release to mark departure from pyfirmata v1
pyfirmata2 has been used now by nearly 200 students in my classes and been thoroughly debugged in this process and is now very stable. It's been tested under Linux, Windows and Mac by a lot of users.
This release also marks the official departure from the original pyfirmata V1.