소스 검색

led indicator on during wifi setup

etisab 10 년 전
부모
커밋
2cacf1b142
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      BUILD/wifiSetup.lua

+ 3 - 0
BUILD/wifiSetup.lua

@@ -1,5 +1,7 @@
 function broadcastAP()
   SETUP = true
+  gpio.mode(4, gpio.OUTPUT)
+  gpio.write(4, gpio.LOW)
   wifi.sta.disconnect()
   debugMsg("WiFi disconnected")
   wifi.setmode(wifi.STATIONAP)
@@ -35,6 +37,7 @@ function updateWiFiCreds(payload)
     file.open("yorecipient.txt", "w+")
     file.write(newrecipient)
     file.close()
+    gpio.write(4, gpio.HIGH)
   end
   SETUP = false -- currently: attempts to send Yos regardless of connection status, as long as form is submitted
 end