• 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 7inch LCD Display 7 inch TouchScreen 7B 1024×600 N16R8 CAN RS485 Sensor Raspberry Pi 5 PCIe TO Gigabit RJ45 ETH Adapter Board (C) Driver-Free RTL8111H For Pi5 Industrial grade isolated USB to RS232/485 converter supports USB to 2-way RS232 + 2-way RS232/485 original FT4232HL UART TTL To RS485 C Built-In Protection Circuits ESP32 S3 Round Rotary LCD touch screen 1.28inch 1.6inch 2.1inch Knob central control lighting LCD DeepsSeek XiaoZhi AI Voice Chat ESP32-S3 1.54 inch LCD Kit N16R8 WROOM-1-N16R8 DevKitC-1 Development Board MPUUART Raspberry Pi 5 PCIe to ISO 2-CH RS485 /2-CH RS232 / USB /UART / TTL Retail electronic Labe VGA to RGB Computer ESP32 LVGL 1.54 inch Passive NFC e-Paper BW Display E-ink Screen No Need Battery Wireless Powered & Data Transfer spotpear ESP-NOW Control XIAO RA4M1 Tiny SuperMini Board For Arduino Uno IDE For SeeedStudio R7FA4M1 Raspberry Pi 12.3 inch LCD HDMI /Type C Display In-Cell Capacitive TouchScreen 1920x720 For Jetson Nano/mini Computer PC Developer Kit LCD1602 I2C Module PWM Adjustable backlight 3.3V/5V For Arduino/ Raspberry Pi/ Pico/ Jetson Nano/ ESP32 Raspberry Pi Starlight Camera IR-CUT IMX462 (A) Sensor 2MP 90 Degree