linkit one digital pins are always HIGH

Hi, I think that my board is defective. I have a linkit one.
I did a simple test with a single instuction digitalread(pin) with a delay(), in loop() function. I set the pin 3 in INPUT with pinMode(3,INPUT), in setup() function.
If I don't connect anything to the pin, the instuction digitalread(3), return 1(HIGH).
I tried the same with Arduino: when I set the pin 3 to INPUT, digitalread(3) return 0(LOW).
I don't think that it's a difference with Arduino. They should behave the same way.
When, for example, I supply the pin 3 with a high voltage, there is no change, becouse the pin is already HIGH. This is why a "button project" than i found online dont work. It is as if there is always an active pullup circuit, but to set a pin to pullup input there is command INPUT_PULLUP in pinMode() instuction.
Could you help me? Please :frowning:

With nothing connected to an input pin they can tend to float , if you connect the input pin to ground then does it still read high with digitalRead()

Thanks for answer. When i Connect the pin to ground whit a pull down circuits, digitalread() return LOW. It works but in reverse. I found this in mediatek site:

“*LinkIt One supports 3 pin modes: *
INPUT mode is used for reading voltage (HIGH or LOW) or sensor. In INPUT mode when the circuit is at high impedance, similar to serially connecting a big resistance in the circuit, the pin can read accurate voltage value. However, this pin may not have enough voltage to activate peripheral devices, e.g. LED.
INPUT_PULLUP mode is similar to INPUT mode, used for reading voltage of sensor. However in this mode, the pin is often at high voltage when the sensor is disabled and turns to low voltage when the sensor is enabled, which is opposite to its behavior in INPUT mode.
OUTPUT mode is used for controlling peripheral devices. In OUTPUT mode when the circuit is at low impedance, the pin has enough voltage to activate or control other devices but cannot read the voltage of sensor.”

When I set the pin in input there are a big resistance…i think that It should have a low voltage.
Do you think that Its operation is correct?

concicetto:
Thanks for answer. When i Connect the pin to ground whit a pull down circuits, digitalread() return LOW. It works but in reverse. I found this in mediatek site:

"LinkIt One supports 3 pin modes:
INPUT mode is used for reading voltage (HIGH or LOW) or sensor. In INPUT mode when the circuit is at high impedance, similar to serially connecting a big resistance in the circuit, the pin can read accurate voltage value. However, this pin may not have enough voltage to activate peripheral devices, e.g. LED.
INPUT_PULLUP mode is similar to INPUT mode, used for reading voltage of sensor. However in this mode, the pin is often at high voltage when the sensor is disabled and turns to low voltage when the sensor is enabled, which is opposite to its behavior in INPUT mode.
OUTPUT mode is used for controlling peripheral devices. In OUTPUT mode when the circuit is at low impedance, the pin has enough voltage to activate or control other devices but cannot read the voltage of sensor."

When I set the pin in input there are a big resistance..i think that It should have a low voltage.
Do you think that Its operation is correct?

Yes, it is correct.
Read the quotations several times. Each one is describing the pin when it is CONNECTED to some external circuit or sensor or device. What do you have connected to YOUR pin?
Paul

I used this circuits in the image but in my linkit one with 10kohm. It read only high. Maybe the pulldown resistor is too high?

concicetto:
I used this circuits in the image but in my linkit one with 10kohm. It read only high. Maybe the pulldown resistor is too high?

The 10k resistor is for use in a PULLUP connection to 5 volts. Pull down is directly to ground as you discovered.
Paul

Ok! Thanks you!