The focus of the GPIOZero library is on simplicity, making it a no-fuss library for beginners getting into physical computing and interfacing electronics. It achieves ease-of-use by abstracting away the underlying technical complexity and allows you to write code that deals with devices and peripherals such as LEDs, buttons, and common sensors, rather than writing lower-level code that directly manages pins.
Technically, GPIOZero is not actually a full-fledged GPIO library in terms of how it interacts with GPIO pin hardware. It is a simplifying wrapper around other GPIO libraries that are employed to do the actual GPIO grunt work. In Chapter 2, Getting Started with Python and IoT, we saw a push button and LED example in both GPIOZero and PiGPIO that illustrated this point.
Here are the key highlights of GPIOZero in a nutshell:
- Description: High-level GPIO Library designed for beginners
- Pros: Easy to learn and use with excellent...