Coder Social home page Coder Social logo

Comments (2)

Links2004 avatar Links2004 commented on May 29, 2024

the WebSocketsClient only needs network no serial, SPI or any IO ports.

most likely the loop is blocked to long by the PN532 lib, and as a result the network connection timesout.

I recomand to check how often your loop is run.

from arduinowebsockets.

amichael04 avatar amichael04 commented on May 29, 2024

This issue puzzled me for a while. In the end it seems that calling if (NfcAdapter.tagPresent()) was blocking the thread too long.

To solve this issue, you need to utilise both ESP32 cores. This link was very useful for what I needed. I simply called websocket.loop() in one task and my readNFC() function in another.

NOTE: You MUST set the websocket task to have the priority tskIDLE_PRIORITY. Otherwise, your ESP will hit a boot loop due to it blocking freeRTOS tasks.

from arduinowebsockets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.