def on_message(client, userdata, msg): path = "" if (platform.system() == "Windows"): path = os.path.dirname(__file__) + "/DataStorage/data/stepcounter.txt" else: path = os.path.dirname(__file__) + "DataStorage/data/stepcounter.txt" if (msg.topic == "home/puc/heartbeat"): qh.insert_heartbeat("./DataStorage/data/heartbeat.txt", msg.payload.decode()) elif (msg.topic == "home/puc/stepcounter"): qh.insert_steps("./DataStorage/data/stepcounter.txt", msg.payload.decode())
def glucose_data(): gc = qh.query_glucose() return gc #if __name__ == "__main__": # main()
def blood_data(blo): qh.insert_bloodpressure(blo)
def glucose_data(glu): qh.insert_glucose(glu)
def stepcounter_data(): sc = qh.query_stepcounter() return sc
def heartbeat_data(): hb = qh.query_heartbeat() return hb
def bloodpressure_data(): bp = qh.query_bloodpressure() return bp