I’m trying to install this library but end up getting this error message:
lib/CircusESP32Lib-1.0.0/src/CircusESP32Lib.cpp: In member function 'double CircusESP32Lib::read(char*, char*)':
lib/CircusESP32Lib-1.0.0/src/CircusESP32Lib.cpp:127:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
if (responsebody!=(char)0) {
^
lib/CircusESP32Lib-1.0.0/src/CircusESP32Lib.cpp: In member function 'char* CircusESP32Lib::parseServerResponse(char*, char*, int)':
lib/CircusESP32Lib-1.0.0/src/CircusESP32Lib.cpp:180:18: error: invalid conversion from 'char' to 'char*' [-fpermissive]
return (char)0;
^
lib/CircusESP32Lib-1.0.0/src/CircusESP32Lib.cpp: In member function 'double CircusESP32Lib::read(char*, char*)':
lib/CircusESP32Lib-1.0.0/src/CircusESP32Lib.cpp:91:19: warning: control reaches end of non-void function [-Wreturn-type]
WiFiClientSecure client;
^~~~~~
*** [.pio\build\featheresp32\lib822\CircusESP32Lib-1.0.0\CircusESP32Lib.cpp.o] Error 1
========================================================== [FAILED] Took 10.11 seconds ==========================================================
I have placed the library in the lib folder on the sidebar in platformio.
Here is my code:
/*
PrøveEksamen Oppgave ESP32 og CircusOfThings
Markus Iversen
31.05.2022
*/
#include <Arduino.h>
#include <CircusESP32Lib.h>
char ssid[] = "CasaIversen";
char password[] = "Sarpsborg08";
char server[] = "www.circusofthings.com"; // Nettsiden hvor CoT-serveren er
char token[] = "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiI5ODQ1In0.5PBH0uNS3FT9GQ-d9-1Q_oQdBHafAKVt2UI3TlxVIwE";
char lysKey[] = "6289";
CircusESP32Lib circusESP32(server,ssid,password);
#define photoPin 39
int photoVal;
int lysstryke;
void setup() {
// plasser oppsett koden her, for å kjøre den èn gang:
Serial.begin(115200);
circusESP32.begin();
pinMode(photoPin, INPUT);
}
void loop() {
// plasser hoved koden her, for å kjøre den gjenløppende:
photoVal = analogRead(photoPin);
lysstryke = map(photoVal, 0, 4095, 100, 0);
circusESP32.write(lysKey, lysstryke, token);
Serial.println(lysstryke);
delay(500);
}
Thanks in advance