MizzardEntertainment97
Member
Hello everyone!
I have a doubt that I can't figure out if it's normal or not:
For hardware reasons I would like to set an output pin to "HIGH" before it is declared as output.
I did this simple program with the Arduino 2 IDE and I notice that the output (connected to a led) does not light up.
If I set the output to "HIGH" after declaring that it is an output, the LED will light up.
Loading the same program on Arduino (Nano) makes the code work.
I would like to switch from a high impedance state to a "HIGH" state as an output.
NB:
I also tried to search the net, but without finding anything, how all the pins are set when the Teensy 4.1 is turned on and what status they assume when I load a new program.
I've found that pins 24 and 25 become "HIGH" when I load a new program.
Is there a table to figure out what the "HIGH" and "LOW" states of each pin are like?
Thank you all for your help!!
I have a doubt that I can't figure out if it's normal or not:
For hardware reasons I would like to set an output pin to "HIGH" before it is declared as output.
I did this simple program with the Arduino 2 IDE and I notice that the output (connected to a led) does not light up.
If I set the output to "HIGH" after declaring that it is an output, the LED will light up.
void setup() {
digitalWrite(24, HIGH);
pinMode(24, OUTPUT);
}
void loop() {
}
Loading the same program on Arduino (Nano) makes the code work.
I would like to switch from a high impedance state to a "HIGH" state as an output.
NB:
I also tried to search the net, but without finding anything, how all the pins are set when the Teensy 4.1 is turned on and what status they assume when I load a new program.
I've found that pins 24 and 25 become "HIGH" when I load a new program.
Is there a table to figure out what the "HIGH" and "LOW" states of each pin are like?
Thank you all for your help!!