Subversion Repositories yaws

Rev

Rev 13 | Rev 15 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 13 Rev 14
Line 21... Line 21...
21
#  MA 02110-1301, USA.
21
#  MA 02110-1301, USA.
22
#  
22
#  
23
#  
23
#  
24
cfgPath = './yaws.cfg'
24
cfgPath = './yaws.cfg'
Line 25... Line 25...
25
 
25
 
26
import database as db
26
import database.samples as db
27
from gpiozero import CPUTemperature
27
from gpiozero import CPUTemperature
28
import time
28
import time
Line 29... Line 29...
29
import sensors
29
import sensors
Line 38... Line 38...
38
Rainfall = None
38
Rainfall = None
39
Sunlight = None
39
Sunlight = None
40
CPUTemp = None
40
CPUTemp = None
Line 41... Line 41...
41
 
41
 
42
def main(args):
42
def main(args):
43
    conn = db.samples.create_connection(dbPath)
43
    conn = db.create_connection()
44
    while True:
44
    while True:
45
        # get Air tph
45
        # get Air tph
46
        data = sensors.tph.read_tph()
46
        data = sensors.tph.read_tph()
47
        AirTemp = data[0]
47
        AirTemp = data[0]