I create a project for measuring the sensor valve and sending it over wifi with WebSocket connection there a couple of header files in this project.
in my_wifi.cpp file I declare 2 instances of the class
tnx @maxgerhardt but, I’ve tried it and let to more error
In file included from src/main.cpp:4:
include/wifi_c.h:10:19: error: variable 'AsyncWebSocket WS' has initializer but incomplete type
AsyncWebSocket WS("/ws");
^
In file included from include/tacho.h:8,
from src/tacho.cpp:1:
include/wifi_c.h:10:19: error: variable 'AsyncWebSocket WS' has initializer but incomplete type
AsyncWebSocket WS("/ws");
src/tacho.cpp:4:25: warning: 'WS' initialized and declared 'extern'
extern AsyncWebSocket WS("/ws");
^
src/wifi_c.cpp:19:18: error: redefinition of 'AsyncWebSocket WS'
AsyncWebSocket WS("/ws");