diff --git a/drivers/drivers/element.py b/drivers/drivers/element.py new file mode 100644 index 0000000000000000000000000000000000000000..720490f4b4a4ac898e0a401962b61586277fdf30 --- /dev/null +++ b/drivers/drivers/element.py @@ -0,0 +1,23 @@ +import requests +import json + +with open('.secrets.json') as secrets_file: + secrets = json.load(secrets_file) + +def get_secrets(setting, secrets=secrets): + try: + return secrets[setting] + except KeyError: + print("Failed to load credentials.") + +class Element: + def __init__(self): + self.url = get_secrets("ELEMENT_URL") + + def warn(self, message): + myobj = {"text":message,"username":"Zygote"} + try: + requests.post(self.url, json=myobj) + #print(myobj["text"]) + except: + print("Failed to send message.") \ No newline at end of file diff --git a/drivers/drivers/templog.dat b/drivers/drivers/templog.dat index 790504be10388358ddd02470183fa2de12a4eb63..9b8515f0080ed8ccfd0c76624096d1dfe5cab23b 100644 --- a/drivers/drivers/templog.dat +++ b/drivers/drivers/templog.dat @@ -1 +1 @@ -1721723768.1442149,30.998525,25.575567,31.34614,25.994017,33.898181 \ No newline at end of file +1721723827.9444673,30.996522,25.553679,31.375976,25.895765,34.028117 \ No newline at end of file diff --git a/drivers/multisampling/element.py b/drivers/multisampling/element.py new file mode 100644 index 0000000000000000000000000000000000000000..720490f4b4a4ac898e0a401962b61586277fdf30 --- /dev/null +++ b/drivers/multisampling/element.py @@ -0,0 +1,23 @@ +import requests +import json + +with open('.secrets.json') as secrets_file: + secrets = json.load(secrets_file) + +def get_secrets(setting, secrets=secrets): + try: + return secrets[setting] + except KeyError: + print("Failed to load credentials.") + +class Element: + def __init__(self): + self.url = get_secrets("ELEMENT_URL") + + def warn(self, message): + myobj = {"text":message,"username":"Zygote"} + try: + requests.post(self.url, json=myobj) + #print(myobj["text"]) + except: + print("Failed to send message.") \ No newline at end of file