1
import board
import neopixel

pixels = neopixel.NeoPixel(board.D18, 144)

for i in range(0, 144):
    pixels[i] = (255, 0, 0)

I'd like to change the code above to the following format.

import RPi.GPIO as GPIO
import neopixel

GPIO.setmode(GPIO.BOARD)

pixels = neopixel.NeoPixel(blanks, 144)

for i in range(0, 144):
    pixels[i] = (255, 0, 0)

How should I change the blanks? Or how should I change the code?

halfer
  • 19,824
  • 17
  • 99
  • 186
LCH
  • 11
  • 1

0 Answers0