add bin position script, update neopixel code

video
Cole Deck 5 years ago
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

5055
cv2

File diff suppressed because it is too large Load Diff

@ -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))

@ -1,3 +1,4 @@
#!/usr/bin/python
import detect
import sort
import timeit
@ -7,7 +8,7 @@ calibration_width = 0.75
image = "img7.jpg"
images = ("img2.jpg", "img3.jpg", "img4.jpg", "img5.jpg", "img6.jpg", "img7.jpg", "img8.jpg")
#images = ("img.jpg", "img2.jpg")
video = False
video = True
def go():
for file in images:
items,output = detect.detect(calibration_width, file, True, False)

153732
sort

File diff suppressed because it is too large Load Diff

1068
timeit

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save