0

Programming Neopixel SK6812 on RaspPi 3
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Programming Neopixel SK6812 on RaspPi 3

by Joty1h1h on Thu Jun 13, 2019 9:58 pm

Hi there,

I'm on a project that purchased the Neopixel SK6812 (Exact item : https://www.adafruit.com/product/1138?length=1).

The project will require using a Raspberry Pi 3 B+ to program the LEDs, but under this documentation (https://learn.adafruit.com/neopixels-on-raspberry-pi#), it just references the ws2811/12. The Sk6812 however uses 2 pins (clock/data) instead of just the 1 pin on the ws2811 (data in).

I am wondering does the Adafruit CircuitPython Neopixel Library allow the Rasp Pi 3 B+ to program the SK6812 leds?

If so, what needs to be changed in the code in order to reference the 2 pins (clock/data) on the SK6812?

Below is a snippet from the Neopixel Library examples:

import time
import board
import neopixel


# On CircuitPlayground Express, and boards with built in status NeoPixel -> board.NEOPIXEL
# Otherwise choose an open pin connected to the Data In of the NeoPixel strip, i.e. board.D1
pixel_pin = board.NEOPIXEL

# On a Raspberry pi, use this instead, not all pins are supported
#pixel_pin = board.D18

# The number of NeoPixels
num_pixels = 10

# The order of the pixel colors - RGB or GRB. Some NeoPixels have red and green reversed!
# For RGBW NeoPixels, simply change the ORDER to RGBW or GRBW.
ORDER = neopixel.GRB

pixels = neopixel.NeoPixel(pixel_pin, num_pixels, brightness=0.2, auto_write=False,
pixel_order=ORDER)

What will need to be changed in the above code to recognize that the Sk6812 uses 2 pins (clock/data) instead of just the 1 pin on the ws2811 (data in)?

Thank you so much for your help! I feel this would be a great addition to the existing documentation. Possible it is somewhere, but I wasn't able to find it.

Joty1h1h
 
Posts: 6
Joined: Mon Apr 09, 2018 4:02 pm

Please be positive and constructive with your questions and comments.