Digitalread guidelines

Hello I'm reading in the loop 4 digital pins (my alarm zones).

When no motion the pin is high 4.58v when the motion is detected my pin goes low 0v.
I'm reading this from my alarm system pins...
i'm declaring pins has:

pinMode(z1pin, INPUT);
pinMode(z2pin, INPUT);
pinMode(z3pin, INPUT);
pinMode(z4pin, INPUT);
then something like this
if (( digitalRead(z1pin)==0) and (z1==0)){z1=1; Serial.println("zona1 on"); }
if (( digitalRead(z1pin)==1) and (z1==1)) {z1=0;Serial.println("zona1 OFF");}

These pins will have the 4,58v 99% of the time so my question is should i on the setup t do the DigitalWrite(High) to activate the pullp resistors ?.. or do i need to do the DigitalWrite(LOW)

The solution is working so far withou any digitalwrite on a input pin..
I just want to do it the right way (learn )..
Regards.

The solution is working so far withou any digitalwrite on a input pin..
I just want to do it the right way (learn )..
Regards.

You only need to use the internal pull-ups if you are wiring to passive switch contacts or devices that utilize an 'open collector' output signal. If it's a normal TTL compatible signal then it will supply a true low and high voltage without requiring a pull-up. However there would be no harm if you did utilize the internal pull-ups, in fact it would possibly prevent a false alarm if the signal was open by a broken wire. Anyway to activate an internal pullup you just follow the pinMode statement for each pin with a digitalWrite statement as follows:

pinMode(z1pin, INPUT);
digitalWrite(z1pin, HIGH); //activates the internal pull-up for that pin.
If you later needed to turn off the pull-up, just do a:
digitalWrite(z1pin, LOW); //turns off the internal pull-up for that pin.

It's in the Arduino reference: digitalWrite() - Arduino Reference

Lefty