Water Tank Level Indicator with Low Level Warning Notifications

Thankyou @sheikinet. First place to start would be this line

volume = ((waterTankHt*(PI*(sq(waterTankDia/2))))-(distance*(PI*(sq(waterTankDia/2)))))/1000;

Instead of formula for circular tank you will need formulae for rectangular tank.

1 Like

Thanks @GG07 For quick response sure will try it.

Hi GG07,
Thanks for sharing! Since I am a beginner for Blynk 2.0 (have done POCs on Blynk older version and RemoteXY) I found exactly what I need with your project.
I wonder if you could share your Dashboard or have considered to migrate the project to Blynk 2.0. ? I will give it a shot and let you know the status (donā€™t think I will completeā€¦)
Thanks in advance
Y3G

I glad you found what you need. I will migrate over to Blynk 2.0 eventully. I have already moved a couple of projects over.

I have changed my water level project slightly to make it easier to input tank dimensions. Here are a couple of screen shots.

Thanks GG07,
Looking forward to, meanwhile I just prepared the dashboard but still struggling.
Not that easy to get info because most of the docs are related to Blynk legacy app.
Keep us posted
BR
Y3G

Blynk 2.0 is fairly simplisticā€¦ Just create a data stream for each virtual pin then connect that data stream to the correct widgetā€¦ With a bit of trial and error you will get it right.

1 Like

I have a rectangular water tank. how to Calculate it. And what changes need to be made in the code

Itā€™s a pity you canā€™t be bothered to scroll up a little and find the same question and itā€™s corresponding answerā€¦

Pete.

2 Likes

BLYNK_WRITE(V10) {
levelAlert = param.asInt();

Can this command retrieve data from Blynk SuperChart?

No.
BBLYNK_WRITE(vPin) is triggered when the value of a datastream changes as the result of widget or the HTTP(S) REST API.

Calling Blynk.syncVirtual(vPin) will cause the server to send the current virtual datastream value to the device, triggering the corresponding BLYNK_WRITE(vPin) function.

Pete.

Pete,
I send data sensor to this vPin, and will changes the datastream in SuperChart. it could update the current datastream. Or is there any way I can retrieve datastream in SuperChart to my device?
I send sensor data with one device and want to retrieve it with another device with the same token

I really donā€™t understand your question.

The type of widget that is attached to your datastream doesnā€™t really matter. If you want to retrieve the last value sent then you can do it in the way I described above. However, in most cases that isnā€™t necessarily, as you know what the last value was, because you just sent it from the device to the datastream.

Pete.

Thank you Pete. for your guidance. I can retrieve data from Blynk Server to the device by the same function but for all widgets by this function:

BLYNK_CONNECTED() {
Blynk.syncAll();
}

before I call out BLYNK_WRITE(vPin) function.

Regards,
Ted

@teddkn when you post code to the forum you need to place triple backticks at the beginning and end so that it displays correctly.
Triple backticks look like this:

```

Iā€™d never use Blynk.syncAll, itā€™s a sledgehammer to crack a nut.
You should synchronise only the datastreams that you need the current values from.

BLYNK_CONNECTED runs once when Blynk is connected, and again if there are subsequent re-connections.

If what you are trying to achieve is to retrieve the datastream values from the server when your device boots-up then it would have been helpful if youā€™d stated that at the beginning.

I suggest you read this for more infoā€¦

Pete.