• 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: ESP32-S3 1.28inch Round LCD Display Screen Module Development Board GC9A01A QMI8658A With Case Raspberry Pi 5 Silver-Shadow Case series bus servos Jetson Nano Development Raspberry Pi Pico rp2040 Display image 1.3inch LCD ST7789 change bmp to hex Raspberry Pi Pico Basics User Guide Milk-V Duo Camera Tutorial 5inch Raspberry Pi Touch Display 2 5-inch Official Original 720x1280 LCD DSI/MIPI Screen RP204 0.85inch LCD X1009 Raspberry Pi 5 PCIe To 5-Port SATA SATA3.0 (NOT BOOT From SATA) ESP32-S3 Development Board 4 inch LCD TouchScreen Display 480x480 RS485 /SHT20 /Relay For Arduino LVGL 86 TVbox ESP32-S3 AI 3.97-inch e-Paper Ink Screen 3.97inch Display AIoT Development Board Deepseek TOF Time-Of-Flight Laser Range Sensor Radar Module UART / I2C Port Pi5 MPS2280D Raspberry Pi 5 PCIe to M.2 NVMe Dual SSD Adapter Board HAT Pi5 Double 2280 E-Paper Font Tutorial Arducam ESP32 S3 Development Board 1.5 inch Round Rotary OLED TouchScreen Smart Knob Display 1.5inch Display 466x466 LVGL for Arduino Raspberry Pi Camera Raspberry Pi 3.5 inch e-Paper link (G) RYBW 384x184 For Arduino / Jetson Nano / STM32