• 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 0.85inch LCD Dual-MCU-Board Retail electronic Tag ESP32-S3 AI Camera 3.5inch LCD Dual MIC Development Board MINI TV BOX Display 3.5 inch Voice Interruption Object Recognition 10-in-1 Multifunctional Raspberry Pi 3.5 inch DSI Display MIPI LCD (H) Capacitive TouchScreen 480x800 Raspberry Pi 5 Heatsink Raspberry Pi DSI LCD Raspberry Pi Pico 2 RP2350B 3.49-inch capacitive TouchCcree 3.49inch LCD display development board 172×640 Pi5 PCIe Raspberry Pi RP2040 LoRa-HF Raspberry Pi 4B/5 Industrial UART 2CH RS485 RS232 CAN FD HAT With Case For Installation of guide rails and hanging ADXL354C Development Board IMX477 IR CUT Camera (A) 12.3MP For Jetson Nano/Orin And Raspberry Pi RP2040 D-Robotics RDK X3 MD Carrier Board For RDK X3 Module Horizon Sunrise Pi ARM Cortex-A53 5Tops ESP32-S3 1.43inch AMOLED Display AI Development Board 466×466 1.43 inch TouchScreen Deepseek SC09 Serial UART Bus Servo Motor Switchable 2.3kg 300Angle Raspberry Pi 18.5 inch Type C/HDMI/4K Display Screen 3840×2160 Computer PC Phone Xbox/PS4/Switch Raspberry Pi 5 RTC Box DeepSeek XiaoZhi AI Voice Chat Robot BOX ESP32-S3 Development Board 1.85 inch Round LCD N16R8