• sales

    +86-0755-88291180

Raspberry Pi Fan Hat RGB LED User Guide

Raspberry Pi Fan Hat User Guide


  1. Install libraries


(If only need one LED. Please refer to step 2 directly)


wiringPi

sudo apt-get install wiringpi


wget https://project-downloads.drogon.net/wiringpi-latest.deb


sudo dpkg -i wiringpi-latest.deb


gpio -v


#See gpio version: 2.52, indicating that the installation was successful


Python

sudo apt-get update


sudo apt-get install python-pip


sudo pip3 install RPi.GPIO


  1. One color LED (Do not occupy GPIO but can only select one color)


The jumper cap settings are as follows:



R is connected to GND (other NC) ,The red light is on





G B The same jumper method


  1. RGB LED multi-color light program control (occupy GPIO)


The jumper cap settings are as follows:






Code:


wget http://spotpear.cn/publichttps://cdn.static.spotpear.com/uploads/picture/learn/raspberry-pi/rpi-expansion/raspberry-pi-fan-hat/led_rgb.py


sudo python led_rgb.py



The RGB LED will turn on and off

TAG: Raspberry Pi PCM5122 I2S DAC HIFI Sound Card DAC Audio expansion Board Free-Driver For PI5/PI4/Zero Raspberry Pi 1.54inch OLED Raspberry Pi 5 Case ESP32 S3 LCD 1.3 inch Holographic Display Screen 1.3inch 3D Transparent Refractive Prism Mini TV For Arduino TVBOX Kit Luckfox Pico Ultra And 4inch LCD RGB Captive TouchScreen Display NanoKVM-USB-Development Raspberry Pi Raspberry Pi UGV Beast PT AI 4G 5G OpenCV Robot Car MediaPipe For Raspberry Pi4B/5 X1301 Raspberry Pi 5 HDMI to CSI-2 Shield 1080P@60fps & Audio & Video Also For 4B/3B Modbus RTU Raspberry Pi IR Thermal Imagi Raspberry Pi 5 Raspberry Pi ESP32 C3 1.44inch LCD Multi Protection Raspberry Pi MLX90640 X1007 Raspberry Pi 5 PCIe to Dual 2.5" SATA HDD/SSD Double-SATA (NOT BOOT From SATA/SSD Raspberry Pi LCD Raspberry Pi Pico 2 RP2350 CAN Onboard XL2515 CAN Controller RP2350A