Expand readme and docs index

This commit is contained in:
Ben Nuttall
2015-10-10 19:21:16 +01:00
parent d91a65bdfd
commit e3a3f03247
2 changed files with 57 additions and 69 deletions

View File

@@ -4,21 +4,28 @@ gpiozero
A simple interface to everyday GPIO components used with Raspberry Pi A simple interface to everyday GPIO components used with Raspberry Pi
Latest release: v0.7.0 Beta 2 Latest release
==============
Motivation The latest release is **v0.7.0 beta 2** released on 9th October 2015.
==========
The "hello world" program in Java is at least 5 lines long, and contains 11 About
jargon words which students are taught to ignore. =====
The "hello world" program in Python is one simple line. However, the "hello With very little code, you can quickly get going connecting your physical
world" of physical computing in Python (flashing an LED) is similar to the Java components together::
program: 6 lines of code to flash an LED.
Young children and beginners shouldn't need to sit and copy out several lines from gpiozero import LED, Button
of text they're told to ignore. They should be able to read their code and
understand what it means. led = LED(2)
button = Button(3)
button.when_pressed = led.on
button.when_released = led.off
The library includes interfaces to many simple everyday components, as well as
some more complex things like sensors, analogue-to-digital converters, full
colour LEDs, robotics kits and more.
Install Install
======= =======
@@ -30,16 +37,6 @@ Install with pip::
Both Python 3 and Python 2 are supported. Python 3 is recommended! Both Python 3 and Python 2 are supported. Python 3 is recommended!
Usage
=====
Example usage for lighting up an LED::
from gpiozero import LED
led = LED(2)
led.on()
Documentation Documentation
============= =============
@@ -51,7 +48,7 @@ Development
This project is being developed on `GitHub`_. Join in: This project is being developed on `GitHub`_. Join in:
* Provide suggestions, report bugs and ask questions as `Issues`_ * Provide suggestions, report bugs and ask questions as `Issues`_
* Help design the `API`_ * Provide examples we can use as `recipes`_
* Contribute to the code * Contribute to the code
Alternatively, email suggestions and feedback to ben@raspberrypi.org or add to Alternatively, email suggestions and feedback to ben@raspberrypi.org or add to
@@ -68,9 +65,8 @@ Contributors
.. _pythonhosted.org/gpiozero: http://pythonhosted.org/gpiozero .. _pythonhosted.org/gpiozero: http://pythonhosted.org/gpiozero
.. _GitHub: https://github.com/RPi-Distro/python-gpiozero .. _GitHub: https://github.com/RPi-Distro/python-gpiozero
.. _Issues: https://github.com/RPi-Distro/python-gpiozero/issues .. _Issues: https://github.com/RPi-Distro/python-gpiozero/issues
.. _API: https://github.com/RPi-Distro/python-gpiozero/issues/7 .. _recipes: http://pythonhosted.org/gpiozero/recipes/
.. _Google Doc: https://docs.google.com/document/d/1EbbVjdgXbKVPFlgH_pEEtPZ0zOZVSPHT4sQNW88Am7w/edit?usp=sharing .. _Google Doc: https://goo.gl/8zJLif
.. _Ben Nuttall: https://github.com/bennuttall .. _Ben Nuttall: https://github.com/bennuttall
.. _Dave Jones: https://github.com/waveform80 .. _Dave Jones: https://github.com/waveform80
.. _Martin O'Hanlon: https://github.com/martinohanlon .. _Martin O'Hanlon: https://github.com/martinohanlon

View File

@@ -1,34 +1,31 @@
# GPIO Zero # GPIO Zero
A simple interface to everyday GPIO components used with Raspberry Pi A simple interface to everyday GPIO components used with Raspberry Pi.
Created by [Ben Nuttall](https://github.com/bennuttall) of the [Raspberry Pi
Foundation](https://www.raspberrypi.org/), [Dave
Jones](https://github.com/waveform80), and other contributors.
## Latest release ## Latest release
The latest release is **v0.7.0 beta 2** released on 9th October 2015. The latest release is **v0.7.0 beta 2** released on 9th October 2015.
## Motivation ## About
The "hello world" program in Java is at least 5 lines long, and contains 11 With very little code, you can quickly get going connecting your physical
jargon words which are to be ignored. The "hello world" program in Python is components together:
one simple line. However, the "hello world" of physical computing in Python
(flashing an LED) is similar to the Java program.
6 lines of code to flash an LED. And skipping over why `GPIO` is used twice in from gpiozero import LED, Button
the first line; what `BCM` means; why set warnings to False; and so on. Young
children and beginners shouldn't need to sit and copy out several lines of text
they're told to ignore. They should be able to read their code and understand
what it means. This module provides a simple interface to everyday components.
The LED example becomes:
```python led = LED(2)
from gpiozero import LED button = Button(3)
red = LED(2) button.when_pressed = led.on
button.when_released = led.off
red.on() The library includes interfaces to many simple everyday components, as well as
``` some more complex things like sensors, analogue-to-digital converters, full
colour LEDs, robotics kits and more.
Any guesses how to turn it off?
## Install ## Install
@@ -51,31 +48,6 @@ sudo pip install gpiozero --upgrade
sudo pip-3.2 install gpiozero --upgrade sudo pip-3.2 install gpiozero --upgrade
``` ```
## What's included?
Components:
- LED
- Buzzer
- Button
- Motion Sensor
- Light Sensor
- Temperature Sensor
- Motor
- RGB LED
- MCP3008 ADC
Boards & accessories:
- LED Board
- Traffic Lights
- PiLITEr
- PI-TRAFFIC
- Fish Dish
- Traffic HAT
- Robot
- Ryanteck MCB Robot
## Getting started ## Getting started
See the [input devices](inputs.md) and [output devices](outputs.md) to get See the [input devices](inputs.md) and [output devices](outputs.md) to get
@@ -84,3 +56,23 @@ using the included accessories.
For common programs using multiple components together, see the For common programs using multiple components together, see the
[recipes](recipes.md) page. [recipes](recipes.md) page.
## Development
This project is being developed on
[GitHub](https://github.com/RPi-Distro/python-gpiozero). Join in:
* Provide suggestions, report bugs and ask questions as
[Issues](https://github.com/RPi-Distro/python-gpiozero/issues)
* Provide examples we can use as
[recipes](http://pythonhosted.org/gpiozero/recipes/)
* Contribute to the code
Alternatively, email suggestions and feedback to ben@raspberrypi.org or add to
the [Google Doc](https://goo.gl/8zJLif).
## Contributors
- [Ben Nuttall](https://github.com/bennuttall) (project maintainer)
- [Dave Jones](https://github.com/waveform80)
- [Martin O'Hanlon](https://github.com/martinohanlon)