My project needs an internet connection to send the water level to the cloud. So, I selected ESP8266-based Wemos D1 Mini board for its form factor and low price. As the connector of the TDK Ultrasonic sensor is not breadboard-friendly, I removed the official green connector from the sensor.

Then I attached a breadboard-friendly 3-pin connector to the sensor wire.

I added the TDK USSM Arduino library to my Arduino IDE. I opened the single sensor cm measurement example file and tried to compile it for my Wemos D1 Mini board. Unfortunately, I was getting the following error messaage.

After doing some research and with the help of ChatGPT I was able to solve the problem by replacing STATUS with TDK_STATUS as shown in the image below.

After making the changes, the code was successfully compiled and uploaded to my board.

After uploading the code to my ESP8266 board, I provided 12V to the sensor from my power supply.


I was getting the sensor data in the serial monitor, as shown in the screenshot below.
