# Source: https://learn.adafruit.com/12mm-led-pixels/circuitpython-wiring-and-setup.md

# 12mm LED Pixels

## CircuitPython and Python Wiring

It's easy to use the 12mm LED pixels with CircuitPython and the&nbsp;[Adafruit CircuitPython WS2801](https://github.com/adafruit/Adafruit_CircuitPython_WS2801)&nbsp;module.&nbsp; This module allows you to easily write Python code to control the lights.

You can use these LEDs with any CircuitPython microcontroller board or with a computer that has GPIO.

## CircuitPython Wiring

You can wire up the WS2801 strand for CircuitPython and using any two GPIO pins. One will serve as the clock Pin and one as the Data Pin.

Danger: 

- **Microcontroller GND&nbsp;** to **&nbsp;Blue Ground line**  
- **Microcontroller D6&nbsp;** to **Green Serial Clock line**
- **Microcontroller D5&nbsp;** to **Yellow Serial Data line**
- **5V Regulated Supply +5V** to **Red +5V Line**
- **5V Regulated Supply Ground** to **Blue Ground line**

![led_pixels_circuitpython-software-wiring_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/083/362/medium640/led_pixels_circuitpython-software-wiring_bb.jpg?1572636541)

[Download Fritzing Diagram](https://cdn-learn.adafruit.com/assets/assets/000/083/361/original/circuitpython-software-wiring.fzz?1572636526)
## Python Wiring

Wiring for Python is pretty simple as well.

- **Microcontroller GND&nbsp;** to **&nbsp;Blue Ground line**  
- **Microcontroller D6&nbsp;** to **Green Serial Clock line**
- **Microcontroller D5&nbsp;** to **Yellow Serial Data line**
- **5V Regulated Supply +5V** to **Red +5V Line**
- **5V Regulated Supply Ground** to **Blue Ground line**

![led_pixels_python-software-wiring_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/094/848/medium640/led_pixels_python-software-wiring_bb.jpg?1600464173)

[Download Fritzing Diagram](https://cdn-learn.adafruit.com/assets/assets/000/094/852/original/python-software-wiring.fzz?1600464229)
### Hardware SPI Wiring on the Raspberry Pi

The Raspberry Pi seem to be an exception in that Hardware SPI seems to work pretty well on here.

- **Microcontroller GND&nbsp;** to **&nbsp;Blue Ground line**  
- **Microcontroller SCLK&nbsp;** to **Green Serial Clock line**
- **Microcontroller MOSI&nbsp;** to **Yellow Serial Data line**
- **5V Regulated Supply +5V** to **Red +5V Line**
- **5V Regulated Supply Ground** to **Blue Ground line**

![led_pixels_python-hardware-wiring_bb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/094/851/medium640/led_pixels_python-hardware-wiring_bb.jpg?1600464207)

[Download Fritzing Diagram](https://cdn-learn.adafruit.com/assets/assets/000/094/853/original/python-hardware-wiring.fzz?1600464247)
- [Previous Page](https://learn.adafruit.com/12mm-led-pixels/arduino-code.md)
- [Next Page](https://learn.adafruit.com/12mm-led-pixels/circuitpython-setup.md)

## Featured Products

### 12mm  Diffused Flat Digital RGB LED Pixels (Strand of 25)

[12mm  Diffused Flat Digital RGB LED Pixels (Strand of 25)](https://www.adafruit.com/product/738)
RGB Pixels are digitally-controllable lights you can set to any color, or animate. Each RGB LED and controller chip is molded into a 'dot' of silicone. The dots are weatherproof and rugged. There are four flanges molded in so that you can 'push' them into a 12mm drill hole in...

In Stock
[Buy Now](https://www.adafruit.com/product/738)
[Related Guides to the Product](https://learn.adafruit.com/products/738/guides)
### 12mm  Diffused Thin Digital RGB LED Pixels (Strand of 25)

[12mm  Diffused Thin Digital RGB LED Pixels (Strand of 25)](https://www.adafruit.com/product/322)
RGB Pixels are digitally-controllable lights you can set to any color, or animate. Each RGB LED and controller chip is molded into a 'dot' of silicone. The dots are weatherproof and rugged. There are four flanges molded in so that you can 'push' them into a 12mm drill hole in...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/322)
[Related Guides to the Product](https://learn.adafruit.com/products/322/guides)
### 5V 10A switching power supply

[5V 10A switching power supply](https://www.adafruit.com/product/658)
This is a beefy switching supply, for when you need a lot of power! It can supply 5V DC up to 10 Amps, running from 110V or 220V power (the plug it comes with is for US/Canada/Japan but you can use any plug adapter for your country, or just replace the cable with a standard computer/appliance...

Out of Stock
[Buy Now](https://www.adafruit.com/product/658)
[Related Guides to the Product](https://learn.adafruit.com/products/658/guides)
### 5V 2A (2000mA) switching power supply - UL Listed

[5V 2A (2000mA) switching power supply - UL Listed](https://www.adafruit.com/product/276)
This is an FCC/CE certified and UL listed power supply. Need a lot of 5V power? This switching supply gives a clean regulated 5V output at up to 2000mA. 110 or 240 input, so it works in any country. The plugs are "US 2-prong" style so you may need a plug adapter, but you can pick one...

In Stock
[Buy Now](https://www.adafruit.com/product/276)
[Related Guides to the Product](https://learn.adafruit.com/products/276/guides)
### Female DC Power adapter - 2.1mm jack to screw terminal block

[Female DC Power adapter - 2.1mm jack to screw terminal block](https://www.adafruit.com/product/368)
If you need to connect a DC power wall wart to a board that doesn't have a DC jack - this adapter will come in very handy! There is a 2.1mm DC jack on one end, and a screw terminal block on the other. The terminals are labeled with positive/negative assuming a positive-tip configuration...

In Stock
[Buy Now](https://www.adafruit.com/product/368)
[Related Guides to the Product](https://learn.adafruit.com/products/368/guides)
### 4-pin JST SM Plug + Receptacle Cable Set

[4-pin JST SM Plug + Receptacle Cable Set](https://www.adafruit.com/product/578)
These 4-wire cables are 15cm long and come as a set, one side has a JST SM type connector plug on the end. The other side has a matching JST SM type receptacle connector. They are good for whenever you have 4 wires you want to be able to plug and unplug. We like the solid and compact nature of...

In Stock
[Buy Now](https://www.adafruit.com/product/578)
[Related Guides to the Product](https://learn.adafruit.com/products/578/guides)

## Related Guides

- [Bluefruit Controlled Macetech RGB LED Shades](https://learn.adafruit.com/ledshades.md)
- [Make it Glow: NeoPixel and LED Diffusion Tips & Tricks](https://learn.adafruit.com/make-it-glow-neopixel-and-led-diffusion-tips-tricks.md)
- [Starduino: 8-Bit Super Mario Tree Topper](https://learn.adafruit.com/starduino-neopixel-8-bit-mario-star-tree-topper.md)
- [NeoPixel Ring Clock](https://learn.adafruit.com/neopixel-ring-clock.md)
- [Star Fragment IoT Lamp](https://learn.adafruit.com/star-fragment-iot-lamp.md)
- [Talking Musical NeoPixel Clock with Infrared, BLE and Touch Controls](https://learn.adafruit.com/talking-musical-neo-pixel-clock-with-infrared-ble-and-touch-controls.md)
- [Perfect Pitch Machine](https://learn.adafruit.com/perfect-pitch-machine.md)
- [CheerLights](https://learn.adafruit.com/cheerlights.md)
- [NeuroDreamer Teardown](https://learn.adafruit.com/neurodreamer-teardown.md)
- [Holiday Lights: Easy DIY Christmas Wreath & Garland with WLED](https://learn.adafruit.com/holiday-garland-decor-app-control-with-no-coding.md)
- [Adafruit IO Home: Security ](https://learn.adafruit.com/adafruit-io-home-security.md)
- [Adafruit NeoPot](https://learn.adafruit.com/adafruit-neopot.md)
- [NeoKey Socket Breakout with NeoPixel for MX and CHOC Key Switches](https://learn.adafruit.com/neokey-breakout.md)
- [NeoPixie Dust Bag](https://learn.adafruit.com/neopixel-pixie-dust-bag.md)
- [Multi-tasking the Arduino - Part 3](https://learn.adafruit.com/multi-tasking-the-arduino-part-3.md)