Skip to content

Commit f62995c

Browse files
author
Marcos Kirsch
committed
Update GPIO lines to use GPIO1 and GPIO2 on NodeMCU devkit 1
1 parent b017526 commit f62995c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

http/garage_door_opener.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ end
2323

2424
return function (connection, args)
2525
print('Garage door button was pressed!', args.door)
26-
if args.door == "1" then pushTheButton(connection, 3) -- GPIO0
27-
elseif args.door == "2" then pushTheButton(connection, 4) -- GPIO2
26+
if args.door == "1" then pushTheButton(connection, 1) -- GPIO1
27+
elseif args.door == "2" then pushTheButton(connection, 2) -- GPIO2
2828
else
2929
connection:send("HTTP/1.0 400 OK\r\nContent-Type: application/json\r\nCache-Control: private, no-store\r\n\r\n")
3030
connection:send('{"error":-1, "message":"Bad door"}')

0 commit comments

Comments
 (0)