• 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: Arduino MLX90641 Raspberry Pi Pico 2 RP2350 1.69 inch LCD TouchScreen Development Board 240x280 1.69inch Display QMI8658 6-Axis ESP32-S3 LCD ESP32-S3 USB Dongle DeepSeek XiaoZhi AI Voice Chat Robot BOX ESP32-S3 Development Board 1.28 inch Round LCD 1.28inch TouchScreen N16R8 Raspberry Pi 64MP Camera Spotpear Screen Raspberry Pi Raspberry Pi 5 PCIe To M.2 E KEY NGFF WIFI7 WIFI6 For BE200/AX210/AX200/RTL8822CE ESP32-S3 ETH Camera Development Board PoE RJ45 / OV2640 OV5640 Port / W5500 / Micro-SD Compatible With Raspberry Pi Pico Size Raspberry Pi 5 PCIe to M.2 Mini NVMe SSD Board (E) With Customized Active Cooler Together Raspberry Pi Milk-V Duo RJ45 Tutorial Raspberry Pi 5 / 4B UPS With PD Trigger Activation Uninterruptible Power Bank Supply 9600mAh 5V/5A 25W Also For Phone/Mini Computer PC Raspberry Pi Pico 2 RP2350 2 inch LCD Capacitive TouchScreen Development Board 240x320 Display QMI8658 6-Axis /OV5640 Camera /SD /Battery Port ESP32 ST7789 tutorial Raspberry Pi CM4 Allwinner Arduino IR Thermal Imaging Camera