• 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 Spotpear Milk-V Duo Information Raspberry Pi 3.97 inch e-Paper link BW 800x480 For Arduino / Jetson / STM32 /ESP32 Milk-V Duo S Usage of USB Type A interface 4 inch e Paper HAT+ E Ink Spectra E6 Full-Color 600x400 Screen Display For Arduino /Raspberry Pi /Jetson Nano /STM32 Computer MAX9296 GMSL Camera Adapter Board 2-Ch High-Speed And Low-Latency Transmission For Jetson Orin Nano/NX Raspberry Pi 5 ESP32 S3 R8 MP3 Board 2.8inch LCD TouchScreen Display Speaker/SD-Card/Battery/QMI8658-6-Axis-Sensor Raspberry Pi Pico 2 RP2350-Tiny/Tiny-Kit Super Mini Board RP2350A spotpear ESP32 S3 4inch LCD Development Board 480x480 TouchScreen Display TVBOX LVGL HMI Sensor CAN RS485 Arduino MLX90641 USB to I2C DeepSeek ESP32-S3 Voice Chat Robot espHome XiaoZhi Ball Sipeed-Lichee-Tang-Nano-FPGA-Series-IDE-Install Raspberry Pi 4B/5 Industrial UART 2CH RS485 RS232 CAN FD HAT With Case For Installation of guide rails and hanging Raspberry Pi Pico 2 RP2350 Pico2 ARM Cortex-M33 And RISC-V Hazard3 520KByte 4MByte QSPI Flash LuckFox