HELP NEEDED-COUNT TWO DRIP WATER WITH IR Sensor Each

Hi All, I want to make my first arduino project. This is the description about the project:
-Using two IR sensor to detect the dripping water in two different pipe.
-count number of dripping water in 30 seconds and shows them in different label in Microsoft Visual Studio.
-Using Serial communication to send and receive data from arduino to Computer.

This is my code for only one IR sensor and its works:
int sensorread = A0;
int counter = 0;
int state;
int milisecond = 0;
int second = 0;
int laststate = HIGH;

void setup()
{
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(sensorread, INPUT);
}

void loop()
{
// put your main code here, to run repeatedly:
state = digitalRead(sensorread);

if (state == LOW && laststate == HIGH)
{
counter++;
delay (30);
}

milisecond++;

if (milisecond == 1000)
{
milisecond = 0;
second++;
if (second == 1000)
{
second = 0;
Serial.println (counter);
counter = 0;
}
}

}

when I doubled it, it can work properly. Can anybody help me to built the arduino code for my project?

Many thanks thanks in help to resolved this program

Michael

THREE copies of this question?

Seriously?

Other two now deleted.
DO NOT CROSS-POST, CROSS-POSTING WASTES TIME.

AWOL:
THREE copies of this question?

Seriously?

Other two now deleted.
DO NOT CROSS-POST, CROSS-POSTING WASTES TIME.

Ah, I wondered why the post had gone when I hit reply.

Try this...

const int sensorread = A0;

void setup()
{
  Serial.begin(115200);
  pinMode(sensorread, INPUT_PULLUP);
}

void loop()
{
  int counter = 0;
  byte state;
  byte laststate;
  laststate = digitalRead(sensorread);    // Pre-load last state
  Serial.println("Begin...");
  unsigned long startTime = millis();     // Get current chip time
  while((startTime + 30000) > millis())
  {
    state = digitalRead(sensorread);
    if (state != laststate)
    {
      counter++;                          // Increments twice per drop so divide by 2 to get true count
      laststate = state;
      Serial.print(".");
      delay (30);                         // Debounce
    }
  }
  Serial.println();
  Serial.println("End.");
  Serial.println (counter/2);
}

Can I used 115200 of baudrate for arduino uno?
When I doubled it to sense two sensors, unfortunately it doesn't work..kindly help me.. is there any code extra that I should add?

Can I used 115200 of baudrate for arduino uno?

yes

michaelindra:
Can I used 115200 of baudrate for arduino uno?
When I doubled it to sense two sensors, unfortunately it doesn't work..kindly help me.. is there any code extra that I should add?

Post your code.