• 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 3.97 inch e-Paper link (G) RYBW 800x480 For Arduino / Jetson / STM32 /ESP32 RP2040 Camera Raspberry Pi Mini ESP32-C6 AI Voice Chat Robot For Xiaozhi 1.8 inch AMOLED Development Board 1.8inch TouchScreen Deepseek ESP32-C5 WIFI6 Development Board ESP32-C5-WROOM-1 N16R4/N16R8 Raspberry Pi Pico Basics User Guide Raspberry Pi 5 Cyberpunk LED Matrix Hourglass Gravity Sensor DIY Countdown Timer Clock STEM Educational Soldering Project for Beginners & Adult Raspberry Pi 5.83 inch e-Paper link (G) RYBW 800x480 For Arduino / Jetson / STM32 /ESP32 2.13Inch E-Ink JETSON NANO B01 ESP32-P4-ETH RJ45 POE DSI/MIPI 10.1 inch LCD Display Touchscreen/CSI Camera/Audio Speaker AI Deepseek Raspberry Pi UGV Rover ROS2 PT AI OpenCV Robot Car MediaPipe For Jetson Orin Nano DC-DC Step-Down Mini voltage Moudle Input 5~36V voltage Output 5V/3.3V 4A Raspberry Pi Compute Module 4 CM4 PCIe to M.2 NVMe SSD TTL UART To CAN Raspberry Pi CM5 IO BASE B Mini Board a Base Development Platform Compute Module 5 IO Board with EEPROM And Encryption chip HDMI to TTL spotpear