does arduino need pull down resistor code example
Example 1: arduino internal pull up resistor
pinMode(2,INPUT_PULLUP);
Example 2: arduino internal pull up resistor
int sensorValue = digitalRead(2);
pinMode(2,INPUT_PULLUP);
int sensorValue = digitalRead(2);