I need a program to print on the screen the pulse count of 3 occupancy sensors.

I need a program to print on the screen the pulse count of 3 occupancy sensors.
I use Arduino 2009 and 16x2 LCD SHIELD.
I did put the code below is not working properly, what could it be?

// include the library code: 
#include <LiquidCrystal.h> 

int conta1 = 0;
int conta2 = 0;
int conta3 = 0;

// initialize the library with the numbers of the interface pins 
LiquidCrystal lcd(8, 9, 4, 5, 6, 7); 

void setup() { 
// set up the LCD's number of columns and rows: 
lcd.begin(16, 2); 
// Print a message to the LCD. 
lcd.print(conta1); 
lcd.print(conta2); 
lcd.print(conta3); 
} 

void loop() { 
// set the cursor to column 0, line 1 
// (note: line 1 is the second row, since counting begins with 0): 



 if (digitalRead(1)==HIGH)
       {
         conta1++;
       }
       
 if (digitalRead(2)==HIGH)
       {
         conta2++;
       }

if (digitalRead(3)==HIGH)
       {
         conta3++;
       }


}

is not working properly

Threaten it with termination of its contract.

What exactly does "not working" mean?

It's a good thing that pins default to inputs, isn't it?

You haven't posted the code that prints the updated values to the LCD

How do you know it isn't counting?
You're not doing any displaying of the updated values.

I made some modifications, but the error still remains. I think the digital port 0 is varying between 0 and 1. because with port 0 disconnected the serial monitor is counting infinitely

#define PIN 0

int conta=0;
void setup()
{
  Serial.begin(9600);
  pinMode (PIN,INPUT);
  Serial.println("Iniciando...");
}


void loop()

{
  

  if (digitalRead(PIN)==HIGH);
  
  {
  conta++;
  Serial.println(conta);
  
 
  }
}
if (digitalRead(PIN)==HIGH);

Ever seen an "if" like that before?
Ever wonder why?

Think the code is wrong? as would be the right?

No, I don't think it is wrong.

I know it is wrong.

how is right?

  1. Find any example code with an "if" in it.
  2. Compare it with your "if".
  3. Play "Spot-the-difference"
#define PIN 0
...
  Serial.begin(9600);
  pinMode (PIN,INPUT);

You may want to think about changing pins

not found error. would be better if you show the correct. Thank you!

The error is shown in reply #5.
The code inside the quote box shows about 28 characters.
One of them should not be there.