• 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 13.3 inch FHD AMOLED 1080P Capacitive TouchScreen Display Type-C/HDMI For Computer PC Raspberry Pi 5 User Guide UGV Beast PT Kit AI OpenCV Robot Car MediaPipe For Jetson Orin Raspberry Pi 6.25 inch DSI Display MIPI LCD Capacitive TouchScreen 720x1560 Dual-MCU-Board Raspberry Pi Pico 2 RP2350 1.28 inch Round LCD TouchScreen Development Board 240x240 Display QMI8658 6-Axis $17.9 ESP32-S3 DeepSeek XiaoZhi AI Voice Chat Robot BOX ESP32-S3 Development Board 1.85 inch Round LCD N16R8 ESP32-C6 LCD Development Board 0.85 inch Display 0.85inch Screen 128x128 Mini SD-Port QST LVGL For Arduino ESP32-S3 QMI8658A Industrial Hybrid relay module RS485 Modbus RTU rail with isolation protection Raspberry Pi CM5 Mini Base IO Board NANO A Development For Compute Module 5 BPI WiFi6 Accelerometer BG95-M3-Zero QuecPython EVB development support LTE/EGPRS and GNSS USB TO TTL Mini FT232 UART Communication Converter Original FT232RNL Arducam Raspberry Pi Pico 2 RP2350 ETH CH9120 TCP/UDP Ethernet Network For Arduino MPS2280D Raspberry Pi 5 PCIe to M.2 NVMe Dual SSD Adapter Board HAT Pi5 Double 2280