• 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: Raspberry Pi RP2040 LoRa Raspberry Pi 5 POE + PCIe to M.2 NVMe SSD Board HAT+ Pi5 2242/2230 Power over Ethernet Sipeed FPGA Tang Primer 20K Dock/Lite 128M DDR3 Development Board GW2A-LV18PG256C8/I7 Raspberry Pi 5 PCIe to SSD Computer USB Monitor Screen Raspberry Pi 13.3 inch FHD AMOLED 1080P Capacitive TouchScreen Display Type-C/HDMI For Computer PC RISC-V Milk-V Duo Arduino Board Managers Tutorial User Guide Raspberry Pi 2-Channel Isolated CAN Bus Expansion HAT Dual Chips Solution Built-In Multi Protections Solar Power Manager Module (D) USB Camera 5MP OS05A20 USB 2.0 onboard single mike 175° wide angle SIM8230G M2 3G/4G/5G/GNSS/GPS Sub-6G PCIe M.2 Moudle For LTE-A/NSA/SA For DFOTA /VoLTE For SIMCOM ADXL354C Evaluation Board Raspberry Pi CM5 Compute Module 5 Dual Gigabit Ethernet RJ45 Expansion IO Base Board AV to RGB Raspberry Pi Camera Case ESP32-C5 Dual-Band Mini Development Board 240MHz ESP32-C5-MINI-1 Milk-V Duo HUB Industrial USB TO 4CH RS232/485/422/TTL Serial UART Converter FT4232HL