• 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: Program Raspberry Pi 10.1 inch DSI LCD TouchScreen Display 800x1280 Also For RK3576/RK3506/ESP32-P4 ESP32-S3 AI Camera 1.28inch LCD Dual MIC Development Board Display 1.28 inch Voice Interruption Object Recognition 10-in-1 Multifunctional Luckfox Pico Industrial Modbus RS485 RTU 8-ch Magnetic Latching Relay Module (C) With Digital Input 240x280 Raspberry Pi 5 voice module RV1103 SC3336 Raspberry Pi CSI-to-HDMI ESP32-C6 Milk V Duo ESP32 S3 Development Board 2.8 inch Round LCD Display 480x480 QMI8658 Sensor / MIC / SD /MP3 Audio /Battery Port LVGL/HMI For Arduino Code DeepSeek AI Voice Chat ESP32 S3 Development Board 1.85 inch Round LCD 1.85inch Display QMI8658 /MIC /SD /MP3 Audio LVGL For Arduino Arducam Industrial Modbus POE ETH RJ45 To Relay 30CH RTU/Modbus TCP-Ethernet For IOT Raspberry Pi Pico 2 RP2350 Pico2 ARM Cortex-M33 And RISC-V Hazard3 520KByte 4MByte QSPI Flash AI Machine Vision Kit OAK-D-POE JPEG Encoder 12MP IP67 Waterproof 4TOPS OpenCV Camera 64MP