Example #1
0
from flask import Flask
from hardware import Hardware
# This is the newer comment.......
# This is a newerst comment......
# This is the 4th attempt to change the file....

app = Flask(__name__)

hardware = Hardware()
perfRPT = PerfRPT()

hardware.set_motorPin(1)
hardware.set_motor_state(0)
hardware.set_motor_power(10)

perfRPT.set_path("pathA")
perfRPT.set_perfRPT("perfReport")
perfRPT.get_path()

#open the log file
f = open("logFile.txt", "a")
f.write("\n Motor state is %i" % (hardware.get_motor_state()))
f.write("\n The power has been set to %i" % (hardware.get_load_power()))
f.close()


@app.route("/")
def index():
    return "Pi Blackbox"