• 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 C6 Development Board 1.43 inch AMOLED QSPI Display 1.43inch TouchScreen Dual MIC AudioI Deepseek N16R8 Raspberry Pi Pico 2 RP2350 1.43 inch AMOLED TouchScreen Development Board 466x466 1.43inch Display QMI8658 6-Axis | PCF85063 RTC | SD | Battery Port SIM7600G H Mini PCIe SIMCom Original 4G LTE Cat-4 Module Global Coverage GNSS ESP32 S3 Development Board 1.47 inch LCD Touch Screen 1.47inch Display 172×320 SD AXS5106L JD9853 Raspberry Pi 5 PCIe to M.2 NVME SSD And Gigabit Ethernet RJ45 HAT RTL8111H M_KEY For 2230/2242/2260/2280 ESP32-P4 PICO Development Board with MIPI DSI 10.1-inch Display SpotPear Raspberry Pi 5 Sound 10-Axis DOF ROS IMU (A) Sensor UART ARM 32 DSP Processor BLE 5.3 Bluetooth / Accelerometer / Gyroscope / Magnetometer / Temperature & Pressure Milk-V Duo English Character Display Principle Raspberry Pi DS3231 Raspberry Pi 7 inch CAPLCD 1280x800 Capacitive TouchScreen HDMI/Type C Display Monitor For Computer mini PC Raspberry Pi 8 inch DSI MIPI LCD TouchScreen Display 8inch 800x1280 For Luckfox Lyra RK3506/ESP32-P4/Luckfox Omni3576 spotpear Round Rotary LCD touch screen 1.28inch 1.6inch 2.1inch Knob central control lighting LCD Raspberry Pi Pico 2 RP2350-Zero Mini Board RP2350A Raspberry Pi RTC USB to SPI MPS2280 POE Raspberry Pi 5 PCIe to M.2 NVMe SSD Adapter Board HAT Pi5 2280/2242/2230