• 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 C3 Zero SIM7600G H Mini PCIe SIMCom Original 4G LTE Cat-4 Module Global Coverage GNSS 1.83inch LCD TouchScreen Display 240×280 NV3030B Arduino Raspberry Pi ESP32S3 Pico STM32 Raspberry Pi Pico Raspberry Pi 4B Electronic EYE 0.71 inch Round Double LCD Display Dual Screen For Arduino Raspberry Pi ESP32 Pico ST Raspberry Pi Pico HDMI Raspberry Pi 5 Audio Jack development board Raspberry Pi CM5 Gigabit/2.5G Dual Ethernet Expansion Board with RJ45 GPIO IO Base Raspberry Pi 4B/5 Industrial UART 2CH RS485 RS232 CAN FD HAT With Case For Installation of guide rails and hanging DeepSeek ESP32-S3 Voice Chat Robot espHome XiaoZhi Ball TVBOX Kit Luckfox Pico Ultra And 4inch LCD RGB Captive TouchScreen Display Omni-Directional Lidar Spotpear 10-Axis DOF ROS IMU (A) Sensor UART ARM 32 DSP Processor BLE 5.3 Bluetooth / Accelerometer / Gyroscope / Magnetometer / Temperature & Pressure Sipeed Lichee Tang Nano 9K FPGA MINI Development Board GW1NR-9 GOAI Gowin Raspberry Pi CM5 Compute Module 5 Development Kit With CM5104032 + Official Original IO Board + Case Raspberry Pi 5 5V5A Power Good low light performance