Update GPIO lines to use GPIO1 and GPIO2 on NodeMCU devkit 1
This commit is contained in:
parent
b017526d71
commit
f62995cf18
@ -23,8 +23,8 @@ end
|
|||||||
|
|
||||||
return function (connection, args)
|
return function (connection, args)
|
||||||
print('Garage door button was pressed!', args.door)
|
print('Garage door button was pressed!', args.door)
|
||||||
if args.door == "1" then pushTheButton(connection, 3) -- GPIO0
|
if args.door == "1" then pushTheButton(connection, 1) -- GPIO1
|
||||||
elseif args.door == "2" then pushTheButton(connection, 4) -- GPIO2
|
elseif args.door == "2" then pushTheButton(connection, 2) -- GPIO2
|
||||||
else
|
else
|
||||||
connection:send("HTTP/1.0 400 OK\r\nContent-Type: application/json\r\nCache-Control: private, no-store\r\n\r\n")
|
connection:send("HTTP/1.0 400 OK\r\nContent-Type: application/json\r\nCache-Control: private, no-store\r\n\r\n")
|
||||||
connection:send('{"error":-1, "message":"Bad door"}')
|
connection:send('{"error":-1, "message":"Bad door"}')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user