gpio pwm init
This commit is contained in:
parent
06781f4732
commit
8ba00075f0
@ -30,13 +30,13 @@ for key, value in pins_pwm.items():
|
||||
def main():
|
||||
# For each pin, read the pin state and store it in the pins dictionary:
|
||||
for pin in pins_out:
|
||||
pins[pin]['state'] = GPIO.input(pins_out[pin]['nr'])
|
||||
pins_out[pin]['state'] = GPIO.input(pins_out[pin]['nr'])
|
||||
for pin in pins_in:
|
||||
pins_in[pin]['state'] = GPIO.input(pins_in[pin]['nr'])
|
||||
|
||||
# Put the pin dictionary into the template data dictionary:
|
||||
templateData = {
|
||||
'pins' : pins,
|
||||
'pins' : pins_out,
|
||||
'pins_in' : pins_in
|
||||
}
|
||||
# Pass the template data into the template main.html and return it to the user
|
||||
@ -67,7 +67,7 @@ def action(changePin, action):
|
||||
|
||||
# Along with the pin dictionary, put the message into the template data dictionary:
|
||||
templateData = {
|
||||
'pins' : pins,
|
||||
'pins' : pins_out,
|
||||
'pins_in' : pins_in
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user