]> wolfpit.net Git - hardware/fuck_tomatoes/.git/blob - FuckTomato.py
0d500382bfafda9c2214b42a7d736a70243cc3b9
[hardware/fuck_tomatoes/.git] / FuckTomato.py
1 import cv2, sys, Printer
2 from User_Interface import Draw, MouseManager, Buttons
3
4 cap = cv2.VideoCapture(0)
5 ret, frame = cap.read()
6 cv2.namedWindow('image')
7 printer = Printer.Printer('COM4', (200, 200))
8 mouse = MouseManager.MouseManager(printer)
9
10 while 1:
11 ret, frame = cap.read()
12 Draw.drawImage(frame, printer)
13 cv2.imshow('image', frame)
14
15 print(printer.packageIsExecuting())
16 #if not printer.packageIsExecuting():
17 # ...Detection and package send... #
18 #After g-code package send, check for XY reset and update printer execution status
19 #pass
20
21 if Buttons.checkButtons(printer): break
22
23 cap.release()
24 cv2.destroyAllWindows()