Commit Graph

20 Commits

Author SHA1 Message Date
Ben Nuttall 17c93d1e45 Release v0.7.0 beta 2 2015-10-09 12:30:13 +01:00
Ben Nuttall ee36451bed Make Motors PWM devices with optional speed argument on methods 2015-10-07 17:09:28 +01:00
Ben Nuttall 65b5ba9ea6 Clean up boards docs page 2015-10-07 15:00:53 +01:00
Ben Nuttall ae19496ab5 Correct heading of Robot interface in docs 2015-10-06 17:12:30 +01:00
Ben Nuttall 1c9ea6c943 Add motor, robot and motion sensor robot examples 2015-10-06 17:03:13 +01:00
Ben Nuttall 493b4e1cda Change RGBLED interface from 0-100 to 0-255, close #40 2015-10-05 13:26:01 +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 0e4caaaef6 Add MCP3008 usage to docs 2015-09-30 21:36:30 +01:00
Ben Nuttall fbede611df Add MCP3008 and potentiometer example 2015-09-30 19:02:12 +01:00
Ben Nuttall 21297ab2bb Expand docs 2015-09-30 12:00:46 +01:00
Ben Nuttall b515d070af Fix typo 2015-09-29 21:54:59 +01:00
Ben Nuttall 8fc8e3444e Add RGBLED using new PWMOutputDevice 2015-09-28 19:34:55 +01:00
Ben Nuttall 2aede36365 Add recipes 2015-09-28 12:47:21 +01:00
Ben Nuttall c1db2dce55 Tidy up docs index 2015-09-28 11:50:56 +01:00
Ben Nuttall 3f960f6da3 Update docstrings and add initial set of documentation 2015-09-28 11:11:00 +01:00
Dave Jones b1913e5e39 Add events to all input devices
Fairly major tidy up of the hierarchy as well. There's now a trivial
base class: InputDevice which simply permits reading of state.
WaitableInputDevice descends from this and introduces waitable events
and callbacks, and provides a hook for calling them but needs further
machinery to activate that hook.

DigitalInputDevice (crap name?) descends from WaitableInputDevice and
uses the standard RPi.GPIO callback mechanisms to handle events. This is
intended for use with trivial on/off devices with predictably small
bounce times.

Next is SmoothedInputDevice (crap name?) which also descends from
WaitableInputDevice. This includes a background threaded queue which
constantly monitors the state of the device and provides a running mean
of its state. This is compared to a threshold for determining active /
inactive state. This is intended for use with on/off devices that
"jitter" a lot and for which a running average is therefore appropriate
or for devices which provide an effectively analog readout (like
charging capacitor timings).

MonitorSensor and LightSensor now descend from SmoothedInputDevice, and
Button descends from DigitalInputDevice. All "concrete" classes provide
event aliases appropriate to their function (e.g. when_dark,
when_pressed, etc.)
2015-09-22 12:48:09 +01:00
Dave Jones 9c64a1dc2f Update the docs with an example
Simple demo of when_dark / when_light
2015-09-21 12:04:51 +01:00
Dave Jones 4a8e17deac Doc corrections
Tidy up wrapping and replace all references to gpio_components with
gpiozero
2015-09-21 08:33:03 +01:00
Ben Nuttall a8b93cf97f Add setup.py and distribution basics 2015-09-15 17:53:50 +01:00