Commit Graph

227 Commits

Author SHA1 Message Date
Dave Jones
759a6a58e6 Fix #140, fix #69, fix #185
This PR adds a software SPI implementation. Firstly this removes the
absolute necessity for spidev (#140), which also means when it's not
present things still work (effectively fixes #185), and also enables any
four pins to be used for SPI devices (which don't require the hardware
implementation).

The software implementation is simplistic but still supports clock
polarity and phase, select-high, and variable bits per word. However it
doesn't allow precise speeds to be implemented because it just wibbles
the clock as fast as it can (which being pure Python isn't actually that
fast).

Finally, because this PR involves creating a framework for "shared"
devices (like SPI devices with multiple channels), it made sense to bung
Energenie (#69) in as wells as this is a really simple shared device.
2016-04-01 12:57:17 +01:00
Ben Nuttall
e09e21a42e Fix typo 2016-03-20 13:34:50 +00:00
Dave Jones
ca7bfab916 Fix #231
Also added an indicator for the USB ports (not strictly accurate for the
Pi Zero, but still useful as an indicator of orientation)
2016-03-19 17:15:15 +00:00
Barry Byford
8ce5e12919 Correction on Traffic Lights Alternative recipe 2016-03-19 11:43:41 +00:00
Andrew Scheller
e5b7436d47 Documentation fix
To stop http://gpiozero.readthedocs.org/en/latest/api_pins.html#abstract-pin saying "class gpiozero.pins.native.Pin"
(which AFAICT is wrong)
2016-02-18 23:37:45 +00:00
Dave Jones
38b89a36f7 Work on #51 - add pot diagram 2016-02-13 10:06:27 +00:00
Dave Jones
e790a097bd Patched circuit diagrams
Thanks to @lurch for the suggestions!
2016-02-13 09:29:23 +00:00
Dave Jones
d090b03679 Work on #51
Some more circuit diagrams; better check these are accurate - I haven't
had time to wire them up and test them!
2016-02-13 00:45:22 +00:00
Dave Jones
0978b4c459 Merge pull request #192 from waveform80/pigpiod
Fix #180 - Add support for pigpio
2016-02-12 20:15:25 +00:00
Dave Jones
aebe42875d Fix #180 - Add support for pigpio 2016-02-12 20:14:10 +00:00
Dave Jones
83fb6ae8b4 Fix #114 - ultrasonic sensors
Implements support for the HC-SR04 ultrasonic sensor as an input device
class named DistanceSensor
2016-02-12 19:27:24 +00:00
Dave Jones
1f2140a9f5 Work on #87
Implement a test suite, including Travis-CI integration
2016-02-11 21:11:22 +00:00
Ben Nuttall
29bcada1f9 Add CamJamKitRobot to changelog 2016-02-09 22:38:07 +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
7099b56974 Fix #168 2016-02-07 19:54:39 +00:00
Dave Jones
183b854717 Fix #119
Add a bunch of code snippets demonstrating generators to the recipes
chapter, including a temperature recipe for the MCP3008.
2016-02-07 19:45:52 +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
44e943b322 Re-apply #120 and #117 to rest-docs
Knew I'd missed some patches to the docs! This re-applies the
aforementioned doc patches and also fixes the last RGBLED example (which
was subtly incorrect in the original docs)
2016-01-31 19:28:35 +00:00
Andrew Scheller
7ea312acb9 Move LED example from GPIO2 to GPIO17 2016-01-31 15:54:57 +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
Ben Nuttall
e172caf2cb Merge branch 'master' of github.com:rpi-distro/python-gpiozero 2016-01-04 14:37:04 +00:00
Ben Nuttall
61f4b4919b Correct RGBLED recipe 2016-01-04 14:36:55 +00:00
Andrew Scheller
21f542cb8d Fix upgrade instructions
'apt-get upgrade' always upgrades all packages, to upgrade a single package we need to use 'apt-get install'
2015-12-01 10:19:57 +00:00
Ben Nuttall
942859b5a2 Merge branch 'master' of github.com:rpi-distro/python-gpiozero 2015-11-28 02:58:46 +00:00
Ben Nuttall
81a782b5f3 Add apt install instructions 2015-11-28 02:58:37 +00:00
Ben Nuttall
dbb95b5e37 Fix typo 2015-11-23 11:32:35 +00:00
Andrew Scheller
f55d92e9db Update recipes
Remove superfluous function from Music Box example, and add pause() to all the recipes that need it
2015-11-19 12:16:39 +00:00
Andrew Scheller
ccd880424b typo 2015-11-19 02:04:15 +00:00
Dave Hughes
f1299037b5 Bump versions for release 2015-11-16 12:15:39 +00:00
Andrew Scheller
f1e3ee03b3 Minor typo 2015-11-16 10:34:40 +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
Clare Macrae
b22eebfebe Correct constructor arg names in TrafficLights 2015-11-08 22:38:21 +00:00
Ben Nuttall
010f1fd65c Update LEDBoard init docs 2015-10-25 22:05:17 +00:00
Ben Nuttall
766646f772 Release v0.9.0 beta 4 2015-10-25 18:56:58 +00:00
Ben Nuttall
af2bf9325c Update docs 2015-10-25 18:54:20 +00:00
Ben Nuttall
fe16149b12 Add install dependencies to docs 2015-10-25 15:09:49 +00:00
Ben Nuttall
0805579175 Add 'Initialisation options' to docs 2015-10-18 22:57:22 +01:00
Ben Nuttall
d61f0ff5ec Make default arguments bold 2015-10-18 12:28:53 +01:00
Ben Nuttall
d9bbed2cdf Update release date in docs 2015-10-18 10:46:12 +01:00
Ben Nuttall
cc79749758 Update docs 2015-10-17 15:28:10 +01:00
Ben Nuttall
b7cce51497 Update docs for v0.8.0 2015-10-17 12:36:41 +01:00