mirror of
https://github.com/bitlair/bitlair_doorduino.git
synced 2025-05-13 12:20:07 +02:00
Initial pi-configs from running system
This commit is contained in:
parent
595dd8a30e
commit
5727a9aa71
5 changed files with 300 additions and 2 deletions
|
@ -4,7 +4,7 @@ import serial
|
|||
import sys
|
||||
import time
|
||||
|
||||
SERIAL_PORTS = [ '/dev/ttyS1', '/dev/ttyS2' ]
|
||||
SERIAL_PORTS = [ '/dev/ttyS2' ]
|
||||
|
||||
|
||||
def open_port(tty):
|
||||
|
@ -56,7 +56,7 @@ def remove_button(ports, button):
|
|||
break
|
||||
print(line)
|
||||
|
||||
def add_button(ser, button, secret):
|
||||
def add_button(ports, button, secret):
|
||||
for port in ports:
|
||||
with open_port(port) as ser:
|
||||
ser.write(b'\r\n')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue