• 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: D-Robotics RDK X3 Development Board Horizon Sunrise Pi ARM Cortex-A53 5Tops 2GB/4GB RAM TOF Time of Flight Laser Range Sensor Mini Radar module UART Serial / I2C Port For Arduino / Raspberry Pi / ESP32 LuckFox Pico ESP32 S3 Adjustable Focus ESP32-S3 AI Voice Dialogue Robot Mechanical Dog Development Board Toy Tabletop Pet Deepseek Pi 5 PCIe to M.2 NVMe SSD Board Milk V Duo IO Board Tutorial USB Binocular Camera 2MP OS02G10 Distortion Free Binocular Synchronous Frame USB 2.0 Plug and Play 800x480 Development Board Sipeed Lichee Tang Nano 9K FPGA MINI Development Board GW1NR-9 GOAI Gowin Milk-V Duo ESP32-S3 1.69inch LCD Display With QST Attitude Gyro Sensor QMI8658C For Arduino Python Arduino IR Thermal Imaging Camera Luckfox Pico Max Core3566004032 FT232RNL USB TO TTL Industrial UART Can For Raspberry Pi 5 Terminal Debug JETSON NANO B01 Raspberry Pi 3.5 inch e-Paper link (G) RYBW 384x184 For Arduino / Jetson Nano / STM32