GPIO Zero - a new Python library designed for education - Raspberry Pi Forums
[cross-posted education sub-forum]
i've been working on new python library provides simple interface everyday gpio components. sits on top of standard rpi.gpio requires less code going. it's called gpio zero.
simple example:
i'm aiming minimal boilerplate (no setmode, setwarnings), easy read, guessable , obvious.
i've released public beta , plan full release within month. i'd feedback, particularly teachers, language of interface right (function names , such), , @ simple , complex examples see if it's achieving goals.
install on pi with:
library supports python 3 , python 2. python 3 recommended!
open idle or python shell, import bits you're using , going. full documentation available @ http://pythonhosted.org/gpiozero/
please feel free leave feedback here or in google doc: https://docs.google.com/document/d/1ebb ... edit?pli=1#
i've been working on new python library provides simple interface everyday gpio components. sits on top of standard rpi.gpio requires less code going. it's called gpio zero.
simple example:
code: select all
from gpiozero import led, button led = led(2) button = button(3) button.when_pressed = led.on button.when_released = led.off
i've released public beta , plan full release within month. i'd feedback, particularly teachers, language of interface right (function names , such), , @ simple , complex examples see if it's achieving goals.
install on pi with:
code: select all
sudo apt-get update sudo apt-get install python-pip python3-pip sudo pip install gpiozero sudo pip-3.2 install gpiozero
open idle or python shell, import bits you're using , going. full documentation available @ http://pythonhosted.org/gpiozero/
please feel free leave feedback here or in google doc: https://docs.google.com/document/d/1ebb ... edit?pli=1#
not teacher i've been stem ambassador , have taught mindstorms kids , developed arduino scratch workshop.
comment far, without running it, on following syntax
think i'd replace with
,
comment far, without running it, on following syntax
code: select all
is_active
code: select all
is_on
code: select all
is_off
raspberrypi
Comments
Post a Comment