logo elektroda
logo elektroda
X
logo elektroda

How to connect the WPS button to the ESP8266 NodeMCU and program it?

Teller8241 1224 3
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 18285682
    Teller8241
    Level 2  
    Hello,
    I need help connecting the ESP8266 to a wifi router (without entering a password or SSID when programming). The most reasonable connection would be via a WPS button on the NodeMCU board e.g. a flash button or an external button connected to the pins on the NodeMCU.
    I am interested in the connection diagram and the code to be programmed by the Arduino IDE (I already have the libraries and the nodemcu board uploaded in the Arduino IDE). I would appreciate a brief explanation of the code.
    Ultimately I would like to be able to control the NodeMCU on my website, but this is a further phase of the project.
    Thank you in advance for all ideas :) .
    Do you have a problem with Arduino? Ask question. Visit our forum Arduino.
  • ADVERTISEMENT
  • ADVERTISEMENT
  • #3 18285883
    Teller8241
    Level 2  
    I've seen this link before just something doesn't work for me, most likely pin and cable connections, but thanks for the reply !
  • #4 18285915
    khoam
    Level 42  
    Teller8241 wrote:
    most likely pin and cable connections
    .
    Since you have a NodeCMU, it is safer to use a GPIO other than 0 or 2 to implement the "WPS" button. The connection of the pins themselves is quite simple: both are pulled up to the power supply via 4k7 resistors, with the "WPS" button plugged in between them.

    The program works in such a way that, in the event of WiFi connectivity failure, it issues a low state to the first pin (OUTPUT mode) and waits for a low state to appear on the input of the second pin (INPUT mode). When the button is pressed, these pins are "shorted" and the connection to the router is attempted again. Of course, you also have to press the WPS button beforehand, but the one on the router.
ADVERTISEMENT