Ejemplo n.º 1
0
def random():
	#Turn off all leds
	clearLeds()
Ejemplo n.º 2
0
def led2():
    #Turn off all leds
    clearLeds()
    #Turn on and off led2
    led2Individual()
    return main()
Ejemplo n.º 3
0
from functions.ledsOn import ledsOn
from functions.randomInverted import randomInverted
from functions.led1Inverted import led1Inverted
from functions.led2Inverted import led2Inverted
from functions.led3Inverted import led3Inverted

#Make customOnTime default to randomOnTime if not set later
customOnTime = randomOnTime

app = Flask(__name__)

#Set gpio mode, disable warning output and set led1, led2 and led3 as outputs
gpioSetup()

#Turn off all leds
clearLeds()

@app.route("/")
def main():
   # Pass the template data into the template main.html and return it to the user
	return render_template('main.html')

@app.route("/random")
def random():
	#Turn off all leds
	clearLeds()
	#Turn on random led
    randomLed()
    return main()

@app.route("/random/inverted")