Browse Source

Add helper to have a print loop

master
Elis Hirwing 1 year ago
parent
commit
ae1a444600
Signed by: etu GPG Key ID: D57EFA625C9A925F
2 changed files with 9 additions and 0 deletions
  1. +1
    -0
      Makefile
  2. +8
    -0
      src/main.py

+ 1
- 0
Makefile View File

@@ -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

+ 8
- 0
src/main.py View File

@@ -0,0 +1,8 @@
import time
from csms12 import CSMS12

def printloop():
csms12 = CSMS12()
while True:
print(csms12.getInterval())
time.sleep_ms(500)

Loading…
Cancel
Save