You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying pn532 with hsu the websocket won't get connected with response "disconnected" but when using pn532 with spi the websocket won't respond.
When using the same code with code pn532 remove it works. Is there a conflict in serial input?
Is there any way it can be fixed.
Tried multiple types of packages for pn532 same result. Tried on esp8266 and esp32 same result.
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.
While trying pn532 with hsu the websocket won't get connected with response "disconnected" but when using pn532 with spi the websocket won't respond.
When using the same code with code pn532 remove it works. Is there a conflict in serial input?
Is there any way it can be fixed.
Tried multiple types of packages for pn532 same result. Tried on esp8266 and esp32 same result.
#include <WiFiManager.h>
#include <HTTPClient.h>
#include <ArduinoJson.h>
#include <Wire.h>
#include <SPI.h>
#include <Adafruit_PN532.h>
#include <WebSocketsClient.h>
#include <SPIFFS.h>
#include <mDash.h>
#define PN532_SCK (18)
#define PN532_MOSI (19)
#define PN532_SS (5)
#define PN532_MISO (23)
packages and pins I am using.
The text was updated successfully, but these errors were encountered: