Commit Graph

21 Commits

Author SHA1 Message Date
Ben Nuttall
493b4e1cda Change RGBLED interface from 0-100 to 0-255, close #40 2015-10-05 13:26:01 +01:00
Ben Nuttall
c26c279174 Change PWM interface from 0-100 to 0-1, close #45 2015-10-05 12:37:43 +01:00
Ben Nuttall
fd3f66b832 Ensure PWMOutputDevice pin argument not mandatory, close #43 2015-10-05 12:09:35 +01:00
Dave Jones
7429c03117 Docs clean up part 1
Big push on getting the docs cleaned up before 1.0. Proper wrapping of
everything so it's decently viewable from the command line (or as
decently viewable as markdown can be - the tables will never look great
from the command line).

Only one code change in this PR: rename bouncetime to bounce_time
(everything else is PEP-8, so this probably should be too) and change
its units to seconds from milliseconds (again, all other durations in
the library are in seconds, so it feels inconsistent that this one
isn't; for the sake of those who won't read the docs - which is most
people - I figure consistency helps with guessing!).
2015-10-03 16:24:12 +01:00
Ben Nuttall
3a4d3d4deb Add documentation for Motor, Robot and RyanteckRobot 2015-10-02 18:08:59 +01:00
Ben Nuttall
dc34cf3ccf Implement Motor, Robot and RyanteckRobot 2015-10-02 15:27:55 +01:00
Ben Nuttall
8fc8e3444e Add RGBLED using new PWMOutputDevice 2015-09-28 19:34:55 +01:00
Ben Nuttall
b2a36bba47 Resolve merge conflict 2015-09-28 11:38:09 +01:00
Ben Nuttall
3f960f6da3 Update docstrings and add initial set of documentation 2015-09-28 11:11:00 +01:00
Dave Jones
c35dd1698b Fix #27 2015-09-27 17:29:21 +01:00
Dave Jones
980e4e7144 Fix #32 2015-09-24 16:45:55 +01:00
Ben Nuttall
7811ed67c9 Ensure args are passed to flash() 2015-09-24 12:23:09 +01:00
Ben Nuttall
cfed671972 Add docstrings, close #26 2015-09-24 11:39:50 +01:00
Ben Nuttall
b97e97909c Add flash method to output devices and boards, close #22 2015-09-23 15:31:06 +01:00
Ben Nuttall
5e0a56b11c Make buzzer blink, close #19 2015-09-23 14:18:40 +01:00
Dave Jones
7c647ec616 Fix #23
Add OutputDevice.toggle method with locking for correct threaded
operation
2015-09-23 13:38:37 +01:00
Ben Nuttall
ae1c31e313 pep8 cleanup 2015-09-22 09:36:25 +01:00
Ben Nuttall
41c1bfb18f Initial commit of basic Robot class 2015-09-21 21:11:56 +01:00
Ben Nuttall
be48a96e3e Blink defaults to 1 second on/off 2015-09-21 17:55:19 +01:00
Dave Jones
e2ddad6fea Shut down GPIO threads nicely
The motion sensor queue doesn't shut down properly at script end at the
moment and prevents the interpreter shutting down. This is because it's
a non-daemon thread so `__del__` never gets run and so on.

This is a bit of a major PR - I can split it up if you want. Firstly it
makes a common base class called `GPIODevice` for both `InputDevice` and
`OutputDevice`. This just takes care of the read-only pin stuff. Next it
makes a `GPIOThread` class that ensures its a daemon thread, and which
also ensures proper cleanup on shutdown.

Finally, it fixes `MotionSensor` to use the new `GPIOThread` class
(tested this time! Works nicely) and adds the `blink` method to the
`LED` class (which also works nicely this time).
2015-09-18 12:45:30 +01:00
Ben Nuttall
abdc215175 Rename to gpiozero and tidy up 2015-09-15 17:53:08 +01:00