Update Tutorial.pdf and test.py
This commit is contained in:
a838557765 2020-09-01 15:38:54 +08:00
parent 0c4ddde256
commit 117a2e6ce0
2 changed files with 2 additions and 19 deletions

View File

@ -126,22 +126,7 @@ def test_Buzzer():
except KeyboardInterrupt:
buzzer.run('0')
print ("\nEnd of program")
import cv2
def test_Camera():
try:
print ("\nOpen camera")
capturing_Flag = True
cap = cv2.VideoCapture(0)
while(capturing_Flag):
ret, frame = cap.read()
cv2.imshow("Capture", frame)
cv2.waitKey(5)
cv2.destroyAllWindows()
except KeyboardInterrupt:
print ("\nClose camera")
capturing_Flag = False
# Main program logic follows:
if __name__ == '__main__':
@ -163,9 +148,7 @@ if __name__ == '__main__':
elif sys.argv[1] == 'ADC':
test_Adc()
elif sys.argv[1] == 'Buzzer':
test_Buzzer()
elif sys.argv[1] == 'Camera':
test_Camera()
test_Buzzer()

Binary file not shown.