Hi,
I’m new to all this, so please be gentle
How is it that the following code always outputs 1 / HIGH to the serial connection? - This is with no pin connections at all on a Photon.
I get the ssame result regardless of which digital pin I use. I have also tried , in setup() setting the pin to OUTPUT and writing LOW, before switching pinmode to INPUT.
int in=D3;
void setup() {
pinMode(in,INPUT);
Serial.begin(115200); //baud ignored for USB
}
void loop() {
int state=digitalRead(in);
Serial.println(state);
}