-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
32 lines (27 loc) · 789 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from app import Application
import utils as utils
from config import AppConfig
logger = utils.configure_logger(__name__)
# Number of samples which have been read from the serial connection.
num_samples_read = 0
if __name__ == "__main__":
config = AppConfig(
serial_port="/dev/ttyACM0",
baudrate=115200,
connection_timeout=0.1,
buffer_size=30,
top_k_buffer_size=100,
nrows=12,
ncols=21,
sensitivity=3.0,
log_data=False,
data_directory="/home/workspace/master-thesis/tmp_data/"
)
app = Application(config)
try:
app.run()
except Exception as e:
logger.debug(f"error during run(): {e}")
finally:
logger.debug("cleaning up resources...")
app.teardown()