-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
31 lines (25 loc) · 670 Bytes
/
Copy pathmain.py
File metadata and controls
31 lines (25 loc) · 670 Bytes
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
# Modules
import asyncio
import logging
# Functions and variables
from accounting import check_csv
from barometer import get_barometrics
from button import get_inventory, listener
from display import check_display, initialize, shutdown #, epd
from screens import make_idlescreen
#from waveshare_epd import epd3in7
####### MAIN ########
# The main function is run, showing the idle screen and waiting for button to be pressed
async def main():
try:
logging.info("Starting 21UP")
check_csv()
get_barometrics()
get_inventory()
check_display()
initialize()
make_idlescreen()
await listener()
except KeyboardInterrupt:
shutdown()
asyncio.run(main())