add bin position script, update neopixel code
parent
190dc73036
commit
47eb71057f
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 809 KiB |
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
After Width: | Height: | Size: 824 KiB |
@ -0,0 +1,10 @@
|
||||
import math
|
||||
|
||||
def goToBin(bin):
|
||||
if bin % 2 == 0:
|
||||
direction = "right"
|
||||
else:
|
||||
direction = "left"
|
||||
adjustedBin = math.floor(bin / 2)
|
||||
distance = adjustedBin * 18
|
||||
time = 0.5 + 0.93 * adjustedBin
|
@ -1,8 +1,6 @@
|
||||
import time
|
||||
import board
|
||||
import neopixel
|
||||
pixels = neopixel.NeoPixel(board.D18, 24)
|
||||
def ledoff():
|
||||
pixels.fill((0,0,0))
|
||||
def ledon():
|
||||
pixels.fill((255,255,235))
|
||||
import pixel_control
|
||||
pixel_control.ledOn()
|
||||
time.sleep(10)
|
||||
pixel_control.ledOff()
|
||||
pixel_control.ledOff()
|
@ -0,0 +1,7 @@
|
||||
import board
|
||||
import neopixel
|
||||
pixels = neopixel.NeoPixel(board.D18, 24)
|
||||
def ledOff():
|
||||
pixels.fill((0,0,0))
|
||||
def ledOn():
|
||||
pixels.fill((180,200,180))
|
Loading…
Reference in New Issue