Skip to content

Instantly share code, notes, and snippets.

@RajanRao12
RajanRao12 / code.py
Created May 6, 2022 22:37
Organic Light pattern
import time
import board
import neopixel
pixel_pin = board.D2
num_pixels = 12
pixels = neopixel.NeoPixel(pixel_pin, num_pixels, brightness=0.5, auto_write=False)
ROBIN = (222,35,5)
ROBINDIM = (111,18,3)
@RajanRao12
RajanRao12 / code.py
Created May 6, 2022 22:37
Organic Light pattern with switch (doesn't work)
import time
import board
import neopixel
from digitalio import DigitalInOut, Direction, Pull
pixel_pin = board.D2
num_pixels = 12
switch = DigitalInOut(board.D3)
switch.direction = Direction.INPUT
import time
import board
import neopixel
from digitalio import DigitalInOut, Direction, Pull
import touchio
touch_pad = board.A0 # the ~1 pin
touch = touchio.TouchIn(touch_pad)
@RajanRao12
RajanRao12 / code.py
Created April 25, 2022 22:25
Day two progress
import time
import board
import neopixel
pixel_pin = board.D2 #the ring data is connected to this pin
num_pixels = 12 #number of leds pixels on the ring
pixels = neopixel.NeoPixel(pixel_pin, num_pixels, brightness=0.3, auto_write=False)
RED = (255, 0, 0) #RGB
@RajanRao12
RajanRao12 / code.py
Created April 21, 2022 17:09
Rajan Rao Robin Lamp Color Sequence
import time
import board
import neopixel
pixel_pin = board.D2 #the ring data is connected to this pin
num_pixels = 12 #number of leds pixels on the ring
pixels = neopixel.NeoPixel(pixel_pin, num_pixels, brightness=0.3, auto_write=False)
RED = (255, 0, 0) #RGB