I want to read a SD12 probe an I am stunned that ESP23 is notsupported by the library on github. However I read that a person did get the 1.1.0 version to work ( https://github.com/EnviroDIY/Arduino-SDI-12/issues/47 ) . If this is true I am keen to learn how to do this, can anyone help ? Or any other solutions?
Hi Steven. We’ve never experimented with that sensor.
I recommend trying what that reader suggested PTS93: https://github.com/EnviroDIY/Arduino-SDI-12/issues/47#issuecomment-465793227
Do you have the library 1.1.0 installed in your Arduino IDE?
If you have, you need to navigate to your Arduino libraries folder > open the SDI12 library and edit the file SDI12.h.
When you open that file, it should look like this https://github.com/EnviroDIY/Arduino-SDI-12/blob/master/src/SDI12.h
Then, copy what that PTS93 suggested into the file and save it.
#if defined(ESP32) || defined(ESP8266) enum LookaheadMode{ SKIP_ALL, // All invalid characters are ignored. SKIP_NONE, // Nothing is skipped, and the stream is not touched unless the first waiting character is valid. SKIP_WHITESPACE // Only tabs, spaces, line feeds & carriage returns are skipped. }; #endif
Finally, restart your Arduino IDE and try to use it with the ESP32. Does it work?
As I said, I don’t have that sensor and I never used it before…