A Pin Factory is used in GPIOZero specify which concrete GPIO library GPIOZero will use to perform the actual GPIO work. We will discuss Pin Factories in more detail when we compare the GPIOZero and PiGPIO examples later in this chapter in the Comparing the GPIOZero and PiGPIO examples section:
Device.pin_factory = PiGPIOFactory() # (3)
On line (3), we are telling GPIOZero to use PiGPIO as its Pin Factory using the Device and PiGPIOFactory imports.Â
Now that we've seen how a Pin Factory is set up, let's look at the code that makes our LED blink.