Avatar for Gian

Gian

Member since Jun 2018 • Last active Jun 2018
  • 1 conversations
  • 4 comments

Most recent activity

  • in ESP8266
    Avatar for Gian

    We are currently rewriting the whole code to see if we can fix the problem, we will keep you updated if we managed to find a working solution.

  • in ESP8266
    Avatar for Gian

    I will try to put the code into the callback or wrap in up in a function to call it. if that doesn't work i will upload the code that i have until now.

  • in ESP8266
    Avatar for Gian

    Thank you for the reply and my apologies for the delayed response, I am very glad that you want to help.

    I discussed the option of opening the web socket connection before calling load() with my project members but this doesn't seem for the solution we have been looking for.

    After brainstorming about what should work, the perfect solution would be that connection with the web socket server is called after load(), so we can keep this connection to the web socket server open. Sending the username to the server won't be a one-time thing and even if we manage to create a connection before load(), send the username to the server, close this connection and create a connection after load(), the microcontroller would connect to a different web socket.

    So we are searching for a way to call the connection to the web socket server after load() and keep this same connection open . I tried out to send some simple console logs after load() to see if the microcontroller does anything after it reboots and that seems to work, but it still won't execute the ws connection code so we are pretty much stuck now.

    Once again thank you for the reply and i hope you have a solution for this.

  • in ESP8266
    Avatar for Gian

    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.

Actions