CM Panel technical documentation Buy
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
Products related
Features
Index
Buy
All-in-one 7 inch touch WiFi terminal powered by Raspberry Pi CM4S
- 7 inch TFT display 800x480
- Capacitive touch
- MIPI Camera connector
- WiFi @ 2.4 GHz
Features
Index
Buy
All-in-one 7 inch touch POE terminal powered by Raspberry Pi CM4S
- 7 inch TFT display 800x480 pixel
- Capacitive touch
- Embedded micro UPS for safe shutdown
- Power Over Ethernet @ 10/100 Mbit
- Hi-resolution audio up to 384KHz@32bit
- Real Time Clock with backup battery
- 3 USB Host port
- 1 RS485/422/RS232 port
- 1 Relay
- MIPI Camera connector
- WiFi @ 2.4 GHz (optional)
Features
Index
Buy
Home Automation board powered by Raspberry Pi CM4S lite module
- Power-in @ 12 to 24VDC
- Double opto-isolated RS-485 ports
- 2 relays
- 2 USB 2.0 host port
- Ethernet port at 10/100Mbit
- MIPI Camera connector
- Stereo audio out on 3.5 mm jack
Home page CM Panel technical documentation Buy