added KeyboardInterrupt

Signed-off-by: Ebbe Baß <ebbe@ping-mee.de>
master
Ebbe Baß 2022-08-12 02:18:26 +02:00
parent 1660b75af7
commit 2bc0064083
1 changed files with 5 additions and 2 deletions

View File

@ -14,5 +14,8 @@ except ImportError:
host = serial.Serial('COM3', 9600)
while True:
output = host.readline()
print(output.decode("ASCII"))
try:
output = host.readline()
print(output.decode("ASCII"))
except KeyboardInterrupt:
break