According the kind to define the output ( directly or using a int varaible), the voltage is not the same
Example:
Work correctly
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
Do not work correctly: pin 13 = 1.6vmax and the led doaes not light
int _ABVAR_1_pin13 = 0 ;
void setup()
{
pinMode( _ABVAR_1_pin13 , OUTPUT);
}
void loop()
{
_ABVAR_1_pin13 = 13 ;
while (1)
{
digitalWrite(_ABVAR_1_pin13 , HIGH);
delay( 1000 );
digitalWrite(_ABVAR_1_pin13 , LOW);
delay( 1000 );
}
}
any idea where the probleme is ???