• 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: Gyroscope Sensor Sipeed NanoCluster Mini Cluster Board mini data center For Raspberry Pi CM45 / Computer /LM3H /M4N Desktop Trinket Computer AI Deepseek Mechanical Voice Keyboard Linux 10x0.85inch LCD Screen Customize keys + 2.01 inch Secondary Display ESP32-S3 Smart 86 Box Development Board with 4 inch 480x480 Display Touch Screen For AI and DeepSeek NVIDIA Jetson TX2 NX Module Raspberry Pi USB Global Shutter Camera 1MP OV9281 120fps Black/White 120fps also For Jeston RDK ST servo driver Jetson Orin Nano Super AI Developer Kit Built in Jetson Orin Nano 8GB Memory Core board Raspberry Pi Pico rp2040 Display image 1.3inch LCD ST7789 change bmp to hex Step Recording and Reproduction Raspberry Pi 5 D Raspberry Pi Pico 2 RP2350B 4.3inch Capacitive TouchScreen 4.3 inch LCD Display Development Board 800×480 Raspberry Pi 5 PCIe to M.2 5G/4G/3G HAT With RM520N-GL DeepSeek XiaoZhi AI Voice Chat Robot BOX ESP32-S3 Development Board 1.28 inch Round LCD 1.28inch TouchScreen N16R8 USB TO M.2 Key B 5G DONGLE For SIM8202/SIM8262/RM520/RM530 Raspberry Pi Pico 2 RP2350 USB A Development Board RP2350A SpotPear Industrial CAN FD RS232/RS485 bidirectional converter CAN2.0A/B DPI Interface