• 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: Pi5 Pure-Copper Active Cooler Industrial ESP32-S3 Relay 8-Channel 8-Ch ESP32-WROOM IOT WiFi Bluetooth HAT For Arduino Raspberry Pi Screen Rounded LCD Raspberry Pi IR Ther MK20 Computer AI Deepseek Mechanical Voice Keyboard Linux 20x0.85inch LCD Screen Customize keys + 2.8 inch Secondary Display Modbus RTU Relay 32CH LuckFox Bus Servo DC-BUCK-Adapter 7.2V Voltage mini module For SC15/SC09 Servo SpotPear Raspberry Pi 5 PCIe TO Gigabit RJ45 ETH Adapter Board (C) Driver-Free RTL8111H For Pi5 ESP32 1.9inch LCD USB Binocular Camera 2MP OS02G10 Distortion Free Binocular Synchronous Frame USB 2.0 Plug and Play Raspberry Pi Pico 2 RP2350 1.28 inch Round LCD TouchScreen Development Board 240x240 Display QMI8658 6-Axis $17.9 Raspberry Pi 5 Camera ESP32 ST7789 E-Ink Sensor Development Board ESP32 Development Board WiFi+Bluetooth Ultra Low Power Dual Core ESP 32S ESP 32 Similar ESP8266 Pi5