• 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: X1203 Raspberry Pi 5 UPS Board Uninterruptible Power Supply For Li-Battery (NOT includ) Raspberry Pi 8 inch DSI LCD Display With 5MP Front Camera MIPI 800×480 Capacitive TouchScreen X1200 Raspberry Pi 5 UPS Board Uninterruptible Power Supply For 18650-Li-Battery (NOT includ) Raspberry Pi 4B/5 Industrial UART 2CH RS485 RS232 CAN FD HAT With Case For Installation of guide rails and hanging IMX462 Sipeed SLogic 4IN1 USB Logic Analyzer 80M / DAPLink / CKLink Debugger Tool / UART Module ESP32 S3 Development Board 2.8 inch B LCD 2.8inch Display 480x640 TouchScreen QMI8658 Sensor / Battery Port LVGL/HMI For Arduino ST servo driver DPI Interface ESP32-C5 WIFI6 Development Board ESP32-C5-WROOM-1 N16R4/N16R8 Raspberry Pi 5 5V5A Power X1003 Raspberry Pi 5 PCIe to M.2 NVMe SSD MINI Adapter Board HAT Pi5 2242 2230 SpotPear Raspberry Pi 14 inch LCD 2K HDMI /Type C Display Capacitive TouchScreen 2160x1440 For Jetson Nano/mini Computer PC XIAO RA4M1 Tiny SuperMini Board For Arduino Uno IDE For SeeedStudio R7FA4M1 Wiki Install Espressif IDF Plugin Tutorial User Guide X1004 NV3030B DeepSeek XiaoZhi AI Chat Robot ESP32-S3 1.54 inch LCD N16R8 MUMA Development Board Display Screen Wifi Weather Station TimeClock