gpiozero and raspberry pi 3

Lessons learned:

  • Raspberry Pi boards are 3.3 Volts boards - don’t ever feedback 5V!
  • It’s better to connect things to ground
  • Connect your button/switches to Ground instead of 3V3
  • Pin naming/numbering is increadibly confusing:
    • physical pin numbering
    • wiringPi’s gpio tool uses it’s own numbering
    • BCM (Broadcom) has a third one
  • gpiozero lib uses BCM numbering
  • gpiozero instances, such as Button must never go out of scope, doing so removes listeners/triggers

gpiozero is a nice library to get simple code going.

This work by Fredrik Wendt is licensed under CC by-sa.