From f62995cf18d2b07bb8e5c970dfd2a0a94b790e7f Mon Sep 17 00:00:00 2001 From: Marcos Kirsch Date: Sat, 18 Jul 2015 22:43:10 -0500 Subject: [PATCH] Update GPIO lines to use GPIO1 and GPIO2 on NodeMCU devkit 1 --- http/garage_door_opener.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http/garage_door_opener.lua b/http/garage_door_opener.lua index 65b34e4..e5dc874 100644 --- a/http/garage_door_opener.lua +++ b/http/garage_door_opener.lua @@ -23,8 +23,8 @@ end return function (connection, args) print('Garage door button was pressed!', args.door) - if args.door == "1" then pushTheButton(connection, 3) -- GPIO0 - elseif args.door == "2" then pushTheButton(connection, 4) -- GPIO2 + if args.door == "1" then pushTheButton(connection, 1) -- GPIO1 + elseif args.door == "2" then pushTheButton(connection, 2) -- GPIO2 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('{"error":-1, "message":"Bad door"}')