Chat
Welcome to Flux
Treat Flux like your intern. Tell it what you'd like to build and it'll get to work. You can also ask it questions, brainstorm ideas, and teach it your preferences. Learn More
Ready.
Table
| GPIO Pin | Name | Pin Number |
|---|---|---|
| GPIO2 | SDA | 3 |
| GPIO3 | SCL | 5 |
| GPIO4 | GCLK0 | 7 |
| GPIO14 | TXD | 8 |
| GPIO15 | RXD | 10 |
| GPIO17 | GPIO17 | 11 |
| GPIO18 | PWM0 | 12 |
| GPIO27 | GPIO27 | 13 |
| GPIO22 | GPIO22 | 15 |
| GPIO23 | GPIO23 | 16 |
| GPIO24 | GPIO24 | 18 |
| GPIO25 | GPIO25 | 22 |
| GPIO5 | GCLK1 | 29 |
| GPIO6 | GCLK2 | 31 |
| GPIO12 | PWM0 | 32 |
| GPIO13 | PWM1 | 33 |
| GPIO19 | MISO1 | 35 |
| GPIO16 | GPIO16 | 36 |
| GPIO26 | GPIO26 | 37 |
| GPIO20 | MOSI1 | 38 |
| GPIO21 | SCLK1 | 40 |
Table
| Pin Number | Name |
|---|---|
| 1 | PD3 |
| 2 | PD4 |
| 3 | PE0 |
| 6 | PE1 |
| 7 | PB6 |
| 8 | PB7 |
| 9 | PD5 |
| 10 | PD6 |
| 11 | PD7 |
| 12 | PB0 |
| 13 | PB1 |
| 14 | PB2 |
| 15 | PB3 |
| 16 | PB4 |
| 17 | PB5 |
| 19 | PE2 |
| 22 | PE3 |
| 23 | PC0 |
| 24 | PC1 |
| 25 | PC2 |
| 26 | PC3 |
| 27 | PC4 |
| 28 | PC5 |
| 29 | PC6 |
| 30 | PD0 |
| 31 | PD1 |
| 32 | PD2 |
Bash
sudo pip install adafruit-circuitpython-pca9685
Python
import board import busio from adafruit_pca9685 import PCA9685 from adafruit_bus_device.i2c_device import I2CDevice # Initialize I2C bus. i2c = busio.I2C(board.SCL, board.SDA) # Create the PCA9685 object. pca = PCA9685(i2c) pca.frequency = 60 # Define the channel for each LED color. led_red = pca.channels[0] led_green = pca.channels[1] led_blue = pca.channels[2] # Function to set the color. def set_color(red, green, blue): led_red.duty_cycle = red led_green.duty_cycle = green led_blue.duty_cycle = blue # Example use: Setting the color to purple. set_color(0xFFFF, 0x0000, 0xFFFF)
Bash
sudo pip install adafruit-circuitpython-tlc59711
Python
import board import busio import adafruit_tlc59711 # Initialize SPI bus (SCLK and MOSI pins). spi = busio.SPI(board.SCL, board.SDA) # Create the TLC59711 object. tlc59711 = adafruit_tlc59711.TLC59711(spi) # Function to set the color. def set_color(red, green, blue): tlc59711[0] = (red, green, blue) # Channel order R, G, B for first LED tlc59711.write() # Example use: Setting the color to purple. set_color(65535, 0, 65535)
Reviews
Inspect
RPI HAT BP
Controls
Properties
Availability & Pricing
| Distributor | Qty 1 | |
|---|---|---|
| Arrow | $14.96–$15.91 | |
| Digi-Key | $20.78 | |
| LCSC | $3.11–$13.63 | |
| Mouser | $18.32 | |
| Verical | $17.72–$19.63 | |
Assets
id=Raspberry Pi Model B Hat Template-removebg-preview
id=RPi4 3D
Welcome 👋
Flux helps you build PCBs faster with an AI teammate!
Create your account to collaborate, stay updated, fork your own version, and get instant answers from our AI agent.
andrejvysny
copilot