Make water level monitoring with gpios pins

This code works fine for me but i face difficulty in controlling the relay like
I am unable to power the relay using esp8266. Due to low voltage. As if i try to use external power using 5v. It always stay on and not responding while changing the configuration using blynk app. However, i tried one thing i use positive point to connect the positive of relay along with same positive I connect to ESP8266 3v pin then the rely response perfectly but it is too complicated for me. I want to give external power to control the relay but I donā€™t know how!

You donā€™t want to listen to my advice about fixing your coding, so Iā€™m done with this topic.

Pete.

1 Like

I am sorry about it. Actually, I am too bad at coding, and I donā€™t know the meaning of any function. I just used CHAT-GPT for coding. So, it has become difficult for me too understand what you are saying. So, thatā€™s why I request that you please update the code for me. I will be very grateful too you.

Iā€™m not going to re-write your code for you.
Your basic concept of using GPIO pins as liquid level sensors is flawed in my opinion, and wonā€™t reliably give consistent results in all situations.

As i said initially, youā€™d be better using an ultrasonic sensor or float switches. There are lots of example sketches of projects using an ultrasonic sensor and Blynk on the forum, and if your coding skills are inadequate then that would be the best approach.

Pete.

1 Like

Ok thanks for helping.