• 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: Programmable Keyboard Allwinner H618 RoArm M2 4 DOF High Torque Serial Bus Servo ROS2 WIFI ESP NOW UART USB ST3235 QMI8658C For ESP32 Industrial Modbus RS485 RTU 8-ch Magnetic Latching Relay Module (C) With Digital Input Arduino IR Thermal Imaging Camera ESP32 Development Board C3 1.28 inch Round Rotary LCD Smart Screen 1.28inch Knob Display 240x240 LVGL for Arduino Raspberry Pi UART Computer Desktop Monitor Display IMX462 Raspberry Pi Triple LCD HAT Raspberry Pi CM5 Compute Module 5 Dual Gigabit Ethernet RJ45 Expansion IO Base Board BPI-M4 Zero USB to SPI Raspberry Pi 5 PCIe to USB Gen1 HUB and M.2 NVMe SSD PI5 Expansion board HAT+ Industrial USB to RS485 Converter Pan-Tilt Kit Raspberry Pi IR Thermal Imagi Milk-V Duo Industrial Modbus POE ETH RJ45 To 8-Ch Relay B RTU/Modbus TCP-Ethernet For IOT Raspberry Pi CM5 Mini Base IO Board NANO A Development For Compute Module 5