Hi, I’m currently working on a project which requires me to detect and count the number of droplet flow within a channel. I’m using IR sensor to detect the presence and the output of the sensor is connected to analog pin. So far, I only managed to detect the presence of the droplet (which alternately water and air) but the counting is not working.
This is my coding,
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
pinMode (analog, INPUT);
// set up the LCD’s number of columns and rows:
sensorValue = analogRead(analog);
count = count++;
else if (sensorValue < 50)
//value = val;
Any idea? Thanks.