• 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: Luckfox Pico Raspberry Pi 5 CR2032 Industrial RS232 to RS485 Raspberry Pi 5 RTC charge configuration ESP32 Thermal imaging ESP32-C3-Ornament-Trinket-LVGL-Astronaut-Clock-Watch-MINI-TV-1.69inch-Round-LCD-TouchScreen-ST7789-240x280 RS485 to Ethernet ESP32-S3 Round Screen Raspberry Pi MiniPCIe Interface 2 CH CAN Card USB CAN Multiple Protection Circuits For Linux/Windows USB to UART LCD1602 I2C Module PWM Adjustable backlight 3.3V/5V For Arduino/ Raspberry Pi/ Pico/ Jetson Nano/ ESP32 RP2040-PiZero Raspberry Pi Camera V1 Tang Nano FPGA Demo Code ESP32 P4 Development Board 7inch Display 7 inch TouchScreen Onboard ESP32-C6/Camera-Port/Speaker-Port Raspberry Pi 5inch Display 1024x600 HDMI Capacitive TouchScreen 5 inch LCD B Wide-Cover For Mini PC Raspberry Pi Mini Raspberry Pi 5 PWM Fan Industrial Isolated RS485 TO ETH (C) RJ45 Converter Wall/Rail-Mount For Modbus