• 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: Workstation electronic Nameplate Milk-V Duo S UART Serial Console​ Pi 5 PCIe to M.2 NVMe SSD Board Raspberry Pi Game Raspberry Pi 5 AI kit Hailo8 26Tops PCIe to M.2 NVMe HAT Plus For Pi5 Servo ESP32 ST7789 tutorial ESP32 C3 Round LCD Development Board Electronic EYE 0.71 inch Display Watch Screen GC9A01 160x160 ADXL354C Dev Board spotpear Raspberry Pi Compute Module 5 PoE BASE A IO Board RJ45 For CM5 Lite/eMMC Raspberry Pi 64MP Camera Arduino MLX90640 Raspberry Pi Pico 2 RP2350B 2.41 inch AMOLED Development Board QSPI Display TouchScreen 450x600 RM690BO FT6336 QMI8658 Orange Pi Zero 3 Raspberry Pi Compute Module 5 CM5 Cortex A76 BCM2712 With/Without Wi-Fi RAM 2/4/8/16GB eMMC Lite/8/16/32/64GB Raspberry Pi 5 PCIe to M.2 2.8inch Capacitive TouchScreen LCD Display ST7789 CST328 240x320 For Arduino/Raspberry Pi/ESP32/Pico Raspberry Pi display NVIDIA