• Hi,

    I am currently working on a school project in which we have to learn children how to program.
    For this project we are going to use Espruino on a ESP8266 microcontroller to send the code to the robot.

    To add a captive portal for the wifi connection i am using the Espruino-Wifi-Manager. I edited the code so the user can add a username in the form before adding the SSID and password (still a beginner with java-script so please let me know if i did something wrong).

    The problem that i have is that i want to have a connection to a web socket server after the microcontroller connects to the wifi network so we can send the saved username to the web socket server. I added the web socket code under the wifi connection code but after the microcontroller reboots with load() it won't execute the code of the web socket connection. the web socket connection will work if i send the whole code again after the right wifi credentials are saved on flash but i really want to have a web socket connection after sending the code once so it won't be to difficult for the children to use.

    My question is if it is possible to execute the web socket connection code before or after the microcontroller reboots with load(), and if so how i could do this? I tried out many different things but nothing seems to work.

    I will upload the code as a file since it is to long to upload with the code button and i hope anybody can help me out.


    1 Attachment

About

Avatar for Gian @Gian started