• 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: Jetson 64MP Camera ESP32-S3 LCD Electronic EYE 0.71 inch Round LCD Display Screen For Arduino Raspberry Pi ESP32 Pico STM32 Raspberry Pi 3 LCD HAT Raspberry Pi 5 5V5A Power Raspberry Pi LCD ESP32 C6 Development board 1.9 inch LCD display 1.9inch Screen 172×320 With SD slot RGB LED QMI8658 6-Axis-Sensor ST7789 CST816 Screen Raspberry Pi Monitor Official Original DisplayScreen 15.6 inch LCD Full HD 1920x1080 15.6inch Industrial RJ45 Ethernet To 16-ch Relay Module Modbus RTU TCP With Protection and guide rails 1.47 inch LCD AXS5106L TouchScreen JD9853 Display 172x320 For Arduino/Raspberry Pi/Pico/ESP32 Sipeed NanoKVM-USB Finger-sized 4K USB KVM for Server/SBCs Raspberry Pi 5 PCIe to M.2 NVMe SSD Adapter Board C HAT Pi5-PCIe-2280-2242-2230 ESP32 Thermal imaging camera Raspberry Pi Industrial 10.1 inch DSI LCD HMI TouchScreen MIPI Display 1280x800 10.1inch One-Body PC With Front Camera For Pi 4/5 LuckFox Pico Mini ADXL354C Development Board Modbus RTU Relay 32CH ESP32-S3 Development Board 4 inch LCD TouchScreen Display 480x480 RS485 /SHT20 /Relay For Arduino LVGL 86 TVbox Raspberry Pi 5 PCIe To M.2 E KEY NGFF WIFI7 WIFI6 For BE200/AX210/AX200/RTL8822CE