• 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: UART To CAN Mini Raspberry Pi Camera V2 English Character Display Principle ADXL354C Raspberry Pi 5 inch DSI MIPI Display LCD (D) Capacitive TouchScreen 720x1280 GC9A01 SpotPear Electronic EYE 0.71 inch Round LCD Display Screen For Arduino Raspberry Pi ESP32 Pico STM32 X1011 Raspberry Pi 5 PCIe to M.2 NVMe 4-Ports SSD Board HAT Pi5 Four-Times 2280 Arduino IR Thermal Imaging Camera Raspberry Pi Pico 2 RP2350B 3.49-inch capacitive TouchCcree 3.49inch LCD display development board 172×640 Raspberry Pi Mipi display Raspberry Pi Mipi Pi5 Case FLASH File System Operation RS485 ESP32 Development Board C3 1.28 inch Round Rotary LCD Smart Screen 1.28inch Knob Display 240x240 LVGL for Arduino Raspberry Pi 5 PD Trigger JETSON-IO-BASE-A user Guid Raspberry Pi 8 inch DSI LCD Display With 5MP Front Camera MIPI 800×480 Capacitive TouchScreen