• 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 Pico 1.54inch LCD display 240×240 IPS 1.54 inch screen Mobile Robot Tuya AI Voice Robot T5-E1 1.75 inch Round AMOLED TouchScreen GPS For XiaoZhi Development Board Modbus Raspberry Pi 5 DeepSeek XiaoZhi AI Voice Chat ESP32-S3 All-in-One-PCB-Kit N16R8 WROOM-1-N16R8 DevKitC-1 Development Board Raspberry Pi Compute Module 4 CM4 IO Board Dual Gigabit Ethernet Mini Router Board ESP32 C3 ST7735 Raspberry Pi 10.1 inch DSI MIPI LCD TouchScreen Display 10.1inch 720x1280 For Luckfox Lyra RK3506/ESP32-P4/Luckfox Omni3576 Raspberry Pi 5 USB Audio X1002 Raspberry Pi 5 PCIe to M.2 NVMe SSD Adapter Board HAT Pi5 2280 Raspberry Pi 8 inch DSI MIPI LCD TouchScreen Display 8inch 800x1280 For Luckfox Lyra RK3506/ESP32-P4/Luckfox Omni3576 2.9 inch Passive NFC e-Paper ink (G) RYBW Display Screen No Need Battery Wireless Power & Data Transfer MP2.5GD Raspberry Pi 5 PCIe to Dual 2.5G Double Ethernet HAT Pi5 RTL8125 DeepSeek AI Voice Chat ESP32 S3 Development Board 1.8 inch AMOLED Display 368×448 1.8inch TouchScreen Programmable Watch QMI8658 /MIC /Audio /Battery Raspberry Pi 5 PCIe to M.2 NVMe SSD Adapter Board C HAT Pi5-PCIe-2280-2242-2230 SpotPear 1.5inch LCD Raspberry Pi 12.3 inch DSI MIPI Display TouchScreen LCD 720x1920 Luckfox Lyra Omni3576 RK3576 SIM8260G M2 3G/4G/5G/GNSS/GPS Sub-6G PCIe M.2 Moudle For LTE-A/NSA/SA For DFOTA /VoLTE For SIMCOM