fix /dev route
This commit is contained in:
parent
1e0dc6dd59
commit
3fc20e4a82
|
@ -3,15 +3,18 @@
|
|||
# haha, "daemon" :D
|
||||
# aquí iré metiendo la lectura de datos y guardado en algún sitio
|
||||
|
||||
# alias arduinousb='sudo chmod a+rw /dev/ttyACM0'
|
||||
|
||||
import serial
|
||||
import influxdb
|
||||
import influxdb
|
||||
import time
|
||||
import sys
|
||||
|
||||
while True:
|
||||
try:
|
||||
influx = influxdb.InfluxDBClient("localhost", 8086, "root", "root", "hometv")
|
||||
|
||||
ser = serial.Serial("/dev/ttyACM0", 9600) # 9600 bauds
|
||||
ser = serial.Serial(sys.argv[1] or "/dev/ttyACM0", 9600) # 9600 bauds
|
||||
while True:
|
||||
line = ser.readline()
|
||||
parts = line.decode('ascii').strip().split(" ")
|
||||
|
|
Loading…
Reference in New Issue