Go Down

Topic: help for the program for water tank (Read 4 times) previous topic - next topic


I am new to ARDUINO and Programming in 'C'
I have design the   Circuit for the Wire less WATER LEVEL indicator
with [ Empty  10% , 20% , 25% , 30% , 40% , 50% / HALF , 60% , 70% , 75% , 80% , 90% , 100% / FULL  ]
to be display on the LCD
I don't know how to write the program for the same.
any help?????? 



The sketch is a bit sketchy. Let's say your sensor + transmitter is working, what format of information is being transmitted to arduino? Is it ASCII like "12.5" or is it binary? Then some more detail on the 4X16 thing is also helpful.


Converting all to binary 1 of 16 is a waste of time as well as the Holtek devices. What schedules the tank transmitter or does it just blabber all the time?.
scan the tank sensor strip when the tank is being used and go to sleep...
Or inquire the tank status from time to time send the code as an byte (uint8_t) and decode the low order bits (0 to 15).
Typically I would have (and did many times) checked the tank status when either the valve or pump motor was used by the system.
All 'systems' are different and you are lacking some detail about what you are controlling, Tank volume, use, source of water, potable or irrigation...
All are important and are necessary...
For example the water sensor leaves some details out.
Are you scanning the sensor and is it AC and capacitive or DC and resistive. These are very important. What is the power source and is it reliable... There are many things that make or break a sensor like this...
I once built a sensor with 10 float switches calibratable from the input flow sensor data... as a matter of fact the final "Solution" for that job went to the programmer after I added a flow meter to the tank output line. The pump ran just enough to replace the water used and it was about 10 lines of code that obviated the sensor assembly I made for the job at the customers insistence and he paid happily for both the sensor and the modifications to his existing clock code to keep the tank happy.
I later mounted the sensor on the wall... all 20 feet of it as a reminder of how not to try to engineer a job.

--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard


I have design the   Circuit for the Wire less WATER LEVEL indicator

That sketch looks suspiciously like the sort of thing you're left with after your teacher/tutor has finished walking through the problem with you.

I don't know how to write the program for the same.
any help?????? 

You need to understand how your overall solution will work in terms of interactions between the Arduino, these various bits of hardware and the various people and things in the outside world that will interact with your solution.

You need to understand how the various bits of hardware work, how to connect, power and use them from the Arduino.

You need to write code that interfaces with the hardware, and implements the algorithms that join these inputs and outputs together into the overall solution, and test and fix that code until it does what you want.
I only provide help via the forum - please do not contact me for private consultancy.

Go Up