This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import socket | |
import time | |
import sys | |
import argparse | |
from pprint import pprint | |
DEBUG = False | |
def decode_array(content): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import requests | |
import datetime | |
import math | |
tripinfo = requests.get("https://portal.imice.de/api1/rs/tripInfo/trip").json()['trip'] | |
status = requests.get("https://portal.imice.de/api1/rs/status").json() | |
from pprint import pprint | |
#pprint(tripinfo) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os | |
import serial | |
from time import sleep | |
arduino = serial.Serial("/dev/ttyACM0") | |
while True: | |
load = str(int(os.getloadavg()[0]*100/4)) | |
arduino.write(bytes(load+"\n", "utf8")) |