Commit Graph

131 Commits

Author SHA1 Message Date
Ben Nuttall 6174ef035e Merge branch 'PWMLED_pulse' of https://github.com/lurch/python-gpiozero into lurch-PWMLED_pulse 2016-02-12 19:08:40 +00:00
Ben Nuttall 8482fd12a3 Add active_high and initial_value to LEDCollection, close #175 2016-02-11 22:12:45 +00:00
Ben Nuttall 36cbcc3b98 Correct MCP3001 and MCP3201 differentials, re: #162 2016-02-11 22:02:34 +00:00
Ben Nuttall add95cc6c0 Merge branch 'master' of github.com:rpi-distro/python-gpiozero 2016-02-11 21:51:38 +00:00
Ben Nuttall 3f9ea91560 Add additional ADC chips, close #162 2016-02-11 21:51:25 +00:00
Dave Jones 1f2140a9f5 Work on #87
Implement a test suite, including Travis-CI integration
2016-02-11 21:11:22 +00:00
Dave Jones b4a8273472 Bump version and update changelog for 1.1
Includes some last minute changes too
2016-02-08 23:37:13 +00:00
Dave Jones 8e0c6e243b Refactor low level implementation
This commit is a fairly major piece of work that abstracts all pin
operations (function, state, edge detection, PWM, etc.) into a base
"Pin" class which is then used by input/output/composite devices to
perform all required configuration.

The idea is to pave the way for I2C based IO extenders which can present
additional GPIO ports with similar capabilities to the Pi's "native"
GPIO ports. As a bonus it also abstracts away the reliance on the
RPi.GPIO library to allow alternative pin implementations (e.g. using
RPIO to take advantage of DMA based PWM), or even pure Python
implementations.
2016-02-08 14:54:18 +00:00
Dave Jones c7ee499989 Merge pull request #177 from waveform80/misc-11
Miscellaneous minor changes for 1.1
2016-02-08 13:37:14 +00:00
Dave Jones 55e99f379a Merge-clean update of PR #126
This is an updated cherry-pick of Martin O'Hanlon's LEDBarGraph class.
2016-02-08 12:54:55 +00:00
Dave Jones 006c10cce0 Miscellaneous minor changes for 1.1 2016-02-08 12:01:42 +00:00
Dave Jones 9871ac3dca Fix #135 2016-02-08 00:33:05 +00:00
Dave Jones 19c19f6ff5 Merge pull request #173 from waveform80/blink-device-not-led
Fix #167
2016-02-07 22:52:49 +00:00
Dave Jones f0ea1627f7 Fix #167 2016-02-07 22:51:41 +00:00
Dave Jones 3f62bc848f Merge pull request #166 from lurch/patch-2
Minor tweak to PWMOutputDevice.is_active
2016-02-07 20:32:06 +00:00
Dave Jones 0c1b6d109e Re: #94 and #161
Adds fade-in/out parameters to LEDBoard's blink() method.
2016-02-07 20:27:09 +00:00
Dave Jones 90a4d5f2bf Merge pull request #161 from lurch/LEDBoard_background_blinking
Add a blink thread to LEDBoard
2016-02-07 20:16:35 +00:00
Dave Jones 7099b56974 Fix #168 2016-02-07 19:54:39 +00:00
Andrew Scheller 29ca48d2a7 Minor tweak to PWMOutputDevice.is_active
...so that its implementation is more consistent with the other is_active methods
2016-02-03 03:34:12 +00:00
Andrew Scheller c133110ab9 Add PWMOutputDevice.pulse method
...which simply calls blink with different default arguments
2016-02-03 01:01:54 +00:00
Andrew Scheller 3ed1ab8446 Add a blink thread to LEDBoard
Fixes #94
2016-02-01 04:49:54 +00:00
Dave Jones e52ad37200 Fix prototypes in docs
The prototypes in the docs are rigged to make out the first parameter as
mandatory (as it effectively is); however this does mean you've got to
remember to update the prototype when you modify it in the code! :)
2016-01-31 20:07:34 +00:00
Dave Jones 96a9112884 Merge pull request #157 from waveform80/output-initial-value
Fix #118
2016-01-31 18:05:51 +00:00
Dave Jones 8b21599257 Fix #118
... and fix up active_high values while we're at it ...
2016-01-31 17:50:02 +00:00
Andrew Scheller 03e2f8779f Typo fix 2016-01-31 17:10:58 +00:00
Dave Jones d5226d1fee Minor changes 2016-01-31 16:25:35 +00:00
Dave Jones de5dff3c1d Fix #143
Add active_high parameter to PWMOutputDevice (there's no reason PWM
devices can't be wired active low after all)
2016-01-31 16:17:43 +00:00
Dave Jones cf18fb971e Fix #121
Change parent of PWMOutputDevice to OutputDevice and implement blink to
maintain compatibility. The version of blink implemented here is
slightly extended to include functionality like Explorer HAT's "pulse".
The parameter defaults behave identically to OutputDevice's blink but
can be adjusted to have the device smoothly fade in and out.
2016-01-31 13:47:11 +00:00
Dave Jones 0bc62aee73 Generic docs need reST
Conversion of all docs to reST so that the generic docs can link easily
with the rest of the docs.
2016-01-30 23:40:12 +00:00
Dave Jones 075841249e Tidying up bits for #150 2016-01-30 21:58:00 +00:00
pcopa 38bc27b546 Have made a simpler structure for MCP3008/3004 and MCP3208/3204.
The code is running on my Pi and seems to be stable
 Have added MCP3301/3302/3304
 have implemented the "M" bit to allow Differential mode
 Have added an "absVal" for absolute values
 Have added a "relVal" for relative val from 0 to 1 (same as "value")
 left "value" for backwards compatabilety, but propse to delete it
 shifted Rx bits for MCP330x

 On branch master
 Your branch is up-to-date with 'origin/master'.

 Changes to be committed:
	modified:   gpiozero/__init__.py
	modified:   gpiozero/input_devices.py

 Untracked files:
	ZeroCombo11.py

 Date:      Mon Jan 18 20:25:36 2016 -0500
2016-01-29 22:03:13 -05:00
Dave Jones 15ce68d1a7 Merge pull request #139 from waveform80/exceptions-module
Move exceptions to their own sub-module
2016-01-07 12:04:59 +00:00
Dave Jones ef5761d409 Merge pull request #138 from alexwlchan/awlc/fishdish
Fix return type of TrafficLightsBuzzer.value
2016-01-07 11:18:40 +00:00
Dave Jones 59ba7154c5 Move exceptions to their own sub-module
This removes the circular dependency introduced in PR#137. This also
fixes up an issue in the base meta-class which meant it wasn't working
in Python 3 (only Python 2), and adds a bit to the meta-class to allow
docstrings to be inherited (taken from the rest-docs branch).
2016-01-07 11:01:49 +00:00
Alex Chan cca4c85afe Fix return type of TrafficLightsBuzzer.value
The FishDishTuple was renamed to TrafficLightsBuzzerTuple in
commit b87e2a4, but the `value` property wasn't modified to match.
2016-01-06 15:06:09 +00:00
Alex Chan 6538d5de7b Add missing InputDeviceError import to devices.py 2016-01-06 14:59:10 +00:00
Ben Nuttall f1d4ca0c05 Add LineSensor 2015-11-23 08:36:14 +00:00
Ben Nuttall cfe200af35 Add CamJamKitRobot interface 2015-11-22 18:35:11 +00:00
Ben Nuttall 4cf634a9c3 Fix typo 2015-11-22 18:25:41 +00:00
Ben Nuttall ef9e5802dc Merge pull request #108 from waveform80/motor-pins
Fix #107
2015-11-15 18:22:01 +00:00
Dave Jones c929b9a53b Fix #107
Add forward_device and backward_device to Motor, left_motor and
right_motor to Robot, and ensure all CompositeDevice descendents have a
proper close() method and closed property. Also, add a few more
_check_open calls around the place to make sure GPIODeviceClosed is
properly raised in response to read and writing values.
2015-11-15 18:19:15 +00:00
Ben Nuttall 71284b233d Fix TrafficHat numbering to match promo photos, re: #65 2015-11-15 17:37:36 +00:00
Ben Nuttall 4975e9c8fb Update docs: add PWMLED and include value, values and source properties 2015-11-15 17:18:10 +00:00
Ben Nuttall 382d6e45fc Reverse order of MCP300X arguments, close #92 2015-11-15 13:51:49 +00:00
Ben Nuttall 492f311cc4 Remove incomplete TemperatureSensor for 1.0 release, close #93 2015-11-15 13:00:06 +00:00
Dave Jones f69b6195ca Fix #75
Alias blink to beep for Buzzer
2015-11-15 11:48:53 +00:00
Dave Jones 4615873b39 Change bouncetime to bounce_time
The parameter was already changed to bounce_time in the base
DigitalInputDevice class, but was overridden (incorrectly) in the
derived Button class.
2015-11-05 19:45:09 +00:00
Dave Jones 04c30d1ad2 Fix speling and grandma mistakes
Several in WaitableInputDevice's attribute docstrings.
2015-11-04 15:33:20 +00:00
Dave Jones e6be9ab274 Fix #100
Permit built-in (C implemented) methods and functions to be used as
event callbacks. Given that prototype introspection is not available for
such routines, assume that they take no (mandatory) parameters.
2015-11-04 12:26:24 +00:00
Dave Jones 0c8eff6a20 Merge pull request #96 from waveform80/pwm-toggle-motor-reverse
Fix #91
2015-10-27 20:05:12 +00:00