mirror of
https://github.com/skaringa/water-counter.git
synced 2024-11-24 18:34:23 +01:00
Ensure that trigger mode is set
This commit is contained in:
parent
964011e832
commit
21997a1d85
3
wairc.py
3
wairc.py
@ -94,6 +94,9 @@ def main():
|
|||||||
if not ser.isOpen():
|
if not ser.isOpen():
|
||||||
print "Unable to open serial port %s" % port
|
print "Unable to open serial port %s" % port
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
# set trigger mode
|
||||||
|
ser.write(b'C\r\n')
|
||||||
|
ser.write(b'T\r\n')
|
||||||
|
|
||||||
trigger_state = 0
|
trigger_state = 0
|
||||||
counter = last_rrd_count()
|
counter = last_rrd_count()
|
||||||
|
Loading…
Reference in New Issue
Block a user