I needed to toggle the pinmode between input and output, and I was wondering if anyone knew what the default pinout state would be if I switched to output? Same as the last time it was set, always defaults to low, or always default to high?
void setup()
{
pinMode(05, OUTPUT); // sets the digital pin as output
digitalWrite(05, HIGH); // sets the output on
pinMode(05, INPUT); // sets the digital pin as input
delay(1000); // waits for a second for no reason.
pinMode(05, OUTPUT); // sets the digital pin as output
}
Would it be the same as previously set? Or would it only default to specific state?