From ae1a4446008461438a8b088bb9da64ded017cb3c Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Tue, 14 May 2019 11:17:25 +0200 Subject: [PATCH] Add helper to have a print loop --- Makefile | 1 + src/main.py | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 src/main.py diff --git a/Makefile b/Makefile index dc5ab4a..fc23fae 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ DEVICE := /dev/ttyUSB3 copy: ampy --port $(DEVICE) put src/pinouts.py ampy --port $(DEVICE) put src/csms12.py + ampy --port $(DEVICE) put src/main.py connect: picocom $(DEVICE) -b115200 diff --git a/src/main.py b/src/main.py new file mode 100644 index 0000000..790bd91 --- /dev/null +++ b/src/main.py @@ -0,0 +1,8 @@ +import time +from csms12 import CSMS12 + +def printloop(): + csms12 = CSMS12() + while True: + print(csms12.getInterval()) + time.sleep_ms(500)