Thank you, Dan, your assistance is much appreciated.
Why the ESP01? Simply because of a lack of experience. As I indicated earlier, I, however, managed to figure the programming out and got so far as to get your LED On/Off example working just fine.
It is the next step where I run into trouble, regardless of how many times I’ve read the README. (I really try to work stuff out, because that is the only way of getting to understand these things.)
My issues which I’ve not been able to figure out:
• Which of your libraries should I use with @Saif76’s sketch? I understand I should use the SmartThingsESP8266WiFi library?
• My understanding is that your library should be combined with @Saif76’s code for the ultrasonic sensor. My issue is that I don’t know how to combine the two. I have tried by loading your SmartThingsESP8266WiFi library and @Saif76’s code in 2 tabs of the Arduino IDE and issued the compile command. That did not work. I tried to “integrate” @Saif76’s code to the bottom of your ESP8266 library within the same tab in the Arduino IDE, but that would also not compile the sketch. My issue is that I know so little, it is almost impossible for me to tell why it fails because I could be making mistakes on numerous levels. I don’t know if I’m adding @Saif76’s code correctly, neither which of your many libraries I should use.
The question therefore here is: If I only want to use the Ultrasonic Sensor, which of your libraries should I use and how do I add @Saif76’s code to your library in the Arduino IDE to create the sketch?
• @Saif76’s code contains the following remark at the top: “- String &name - REQUIRED - the name of the object - must match the Groovy ST_Anything DeviceType tile name” What is the object here? Is it your generic ST_Anything Tile in the ST App, or the Tile name of the new DTH being created for the Ultrasonic Sensor.
• Also, not using an Arduino but the standalone ESP8266, how should I change this part of his code, taking into account his remarks at the top of his code: _PS_Ultrasonic(const __FlashStringHelper *name, unsigned int interval, int offset, byte digitalTriggerPin, byte digitalEchoPin). Do you know what the Serial Pin (for the ESP8266) settings should be and how it should be defined here? The examples I could find on the internet contains what seems to be complicated coding and not simply a single digit representing the Pin. Perhaps if I could see what @SAI76’s working sketch looks like, I’ll be able to figure this one out?
• Lastly, as far as the Hardware setup is concerned, once I’ve written the Sketch to the ESP8266, do I connect the Trig and Echo pins of the ultrasonic sensor to the TX/RX pins respectively, or the other way around? Or should the Sensor be connected to the GPO pins of the ESP8266 (I’ve seen other projects on the www connecting sensors to the GPO pins, but I can’t figure out why/when that should rather be used.)
I’m sorry for being such a bother, but I really need to get this working to determine the level of my backup water reservoir. My problem is that I often attempt (electronic/programming) projects far beyond my capabilities.