add bin position script, update neopixel code

This commit is contained in:
Cole Deck
2020-02-21 10:48:24 -06:00
parent 190dc73036
commit 47eb71057f
15 changed files with 159879 additions and 8 deletions
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
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

+10
View File
@@ -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
View File
File diff suppressed because it is too large Load Diff
+5 -7
View File
@@ -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()
+7
View File
@@ -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))
Regular → Executable
+2 -1
View File
@@ -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
View File
File diff suppressed because it is too large Load Diff
+1068
View File
File diff suppressed because it is too large Load Diff