Ben Nuttall ● Raspberry Pi Community Manager ● Based in Cambridge ● Creator of gpiozero python library ● Columnist on opensource.com ● github.com/bennuttall ● twitter.com/ben_nuttall ● [email protected]
Multi-paradigm: procedural from gpiozero import LED, Button led = LED(17) button = Button(4) while True: if button.is_pressed: led.on() else: led.off()
Supporting multiple back-ends ● RPi.GPIO ● Implemented in C, current default ● RPIO ● Implemented in C ● pigpio ● Python wrapper for C library, runs as daemon, remote pins ● Native ● Pure Python, limited functionality, experimental ● MockPin & MockPWMPin ● Pure Python, used in test suite
pigpio - remote GPIO from Pi or PC from gpiozero import LED from gpiozero.pins.pigpiod import PiGPIOPin led = LED(PiGPIOPin(22, host='192.168.0.2')) led.blink()
Is the internet working? from gpiozero import LED, PingServer from gpiozero.tools import negated green = LED(17) red = LED(18) google = PingServer('google.com') google.source_delay = 60 green.source = google.values red.source = negated(green.values)
What's coming? ● More GPIO devices, more internal devices ● More protocols (I2C, one wire, etc.) ● Improved documentation ● Improved Remote GPIO support including Pi Zero OTG ● Improved advanced features ● GUI representation for real and mock pins ● pinout command line tool
Contributors ● Core team: – Ben Nuttall – Dave Jones – Andrew Scheller ● Contributors: – Martin O'Hanlon – Steve Amor – David Glaude – Edward Betts – Alex Chan – Thijs Triemstra – Schelto vanDoorn – Alex Eames – Barry Byford – Clare Macrae – Tim Golden – Phil Howard