Let's look at the code that configures PiGPIO and the LED's GPIO pin:
GPIO_PIN = 21
pi = pigpio.pi() # (2)
pi.set_mode(GPIO_PIN, pigpio.OUTPUT) # (3)
We create an instance of PiGPIO on line (2) and assign it to the pi variable. We use this variable to interact with the PiGPIO library from this point forward in the code.
On line (3), we configure GPIO pin 21 to be an output pin. Configuring a pin as output means we want to use that pin to control something connected to it from our Python code. In this example, we want to control the LED. Later in this chapter, we'll see an example of an input pin used to respond to button presses.
Now that we have imported our required libraries and configured PiGPIO and the out GPIO pin, let's now see how we are making the LED blink.