devWaves / SwitchBot-MQTT-BLE-ESP32

Allows for multiple SwitchBot bots and curtains to be controlled via MQTT sent to ESP32. ESP32 will send BLE commands to switchbots and return MQTT responses to the broker. Also supports Temperature, Motion, Contact sensors
MIT License
560 stars 70 forks source link

Error when compiling: 'class CRC32' has no member named 'update' #139

Open Tidle999 opened 11 months ago

Tidle999 commented 11 months ago

Got this compiling error when trying to upload the sketch to my diymore ESP-WROOM-32.

`Arduino: 1.8.19 (Windows 10), Board: "DOIT ESP32 DEVKIT V1, 80MHz, 921600, None, Disabled"

SwitchBot-BLE2MQTT-ESP32.ino: In function 'uint32_t getPassCRC(std::__cxx11::string&)':

SwitchBot-BLE2MQTT-ESP32:4229:9: error: 'class CRC32' has no member named 'update'

 crc.update(byteBuffer[i]);

     ^~~~~~

SwitchBot-BLE2MQTT-ESP32:4231:27: error: 'class CRC32' has no member named 'finalize'

uint32_t checksum = crc.finalize();

                       ^~~~~~~~

Mehrere Bibliotheken wurden für "WiFi.h" gefunden

Benutzt: *****AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.11\libraries\WiFi

Nicht benutzt: C:\Program Files (x86)\Arduino\libraries\WiFi

exit status 1

'class CRC32' has no member named 'update'

Dieser Bericht wäre detaillierter, wenn die Option "Ausführliche Ausgabe während der Kompilierung" in Datei -> Voreinstellungen aktiviert wäre. `

trying to do it with arduino ide.

any ideas?

atownsend247 commented 11 months ago

Good morning, replying as I was tinkering around with this at the weekend and got it working, I have found that the Arduino IDE can be cumbersome and a pain to get working, had a similar error as you and assumed it was just I hadn't got the right version of the library here or there.

I'd strongly recommend downloading VSCode and the Platformio extension (both are free) and shouldn't take more than 5-10 minutes to setup (Based on internet connection), but it took a few minutes to load the project due to the number of envs, but selected the appropriate board and compiled first time and was easy to compile and upload :)

Not exactly the answer you were looking for but should help :)