# GPIO management with RPi-GPIO

Make sure the RPi.GPIO library is installed on your Raspberry Pi. It usually comes pre-installed with Raspbian OS, but you can update it or install it by running:

	sudo apt-get update
	sudo apt-get install python3-rpi.gpio

Here’s a complete example that blinks an LED connected to GPIO 30 (EXP1.4 on CM-Panel POE):
	
	import RPi.GPIO as GPIO
	import time
	
	GPIO.setmode(GPIO.BCM)
	GPIO.setup(30, GPIO.OUT)
	
	try:
	    while True:
	        GPIO.output(30, GPIO.HIGH)  # Turn on
	        time.sleep(1)               # Wait for one second
	        GPIO.output(30, GPIO.LOW)   # Turn off
	        time.sleep(1)               # Wait for one second
	finally:
	    GPIO.cleanup()  # Clean up at the end of your script

## GPIO available on EXP1 and EXP2 headers

* @article='pinout_cmpanel-basic'
* @article='pinout_cmpanel-poe'

<br/>
@include='adv_cmpanel' 
