HackUTOKYOv2Pim

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit f137e0779cccd761f4375e43ffd2e7c3cb916f92
parent 923470517c7b09c94b6becc7008ba20768c88ca8
Author: 諒太 林 <ryouturn@gmail.com>
Date:   Fri, 30 Aug 2024 18:07:37 +0900

update test

Diffstat:
Mtest.py | 34----------------------------------
1 file changed, 0 insertions(+), 34 deletions(-)

diff --git a/test.py b/test.py @@ -1,7 +1,4 @@ import RPi.GPIO as GPIO -import time -import sys -import os stepPin = 22 dircPin = 17 @@ -40,37 +37,6 @@ def escapeL(): time.sleep(0.001) time.sleep(1) -def difference(a, b): - if(a < b): - return b - a - return a - b - -def kora(): - os.system('mpg321 -q /home/pi/camera/kora.mp3&') - -def dump(src, keep): - os.system('clear') - RightCount = 0 - LeftCount = 0 - for x in range(0, 32): - str = '' - for y in range(0, 24): - target = src[y*10][x*10] - diff = difference(keep[y][x],target) - if diff > 50: - str += '{:02} '.format(diff) - if(y >= 12): - RightCount += 1 - else: - LeftCount += 1 - else: - str += '-- ' - keep[y][x] = target - print(str) - count=[RightCount,LeftCount] - return count -# 仕様メモcount=[RightCount,LeftCount] - keep = [[0] * 32 for i in range(24)] busy = True