-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
31 lines (26 loc) · 906 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
import utime
from pico_network import connect_network, disconnect_network
from get_measure import get_moisture
from log_measure import log_local, log_remote
def main():
# disconnect_network()
# connect_network()
# result, gpio, ts = get_moisture(28) # returns `round(moisture reading)`
#
# result_cal_dic = { '001' : {"dry": 11111, "wet": 99999 },
# 'gpio' : 28,
# 'measured_on' : utime.time()}
#
# gpio = result_cal_dic['gpio']
# result_mea = 99999
# pico_ts = utime.time()
#
# result_mea_dic = {f'001-{pico_ts}' : {'gpio' : gpio,
# 'process_step' : 'auto',
# 'measure_value' : result_mea}
# }
#
# log_local(result_mea_dic, 'mea')
# log_local(result_cal_dic, 'cal')
if __name__ == "__main__":
main()