The DigitalOutputBlock no longer uses a function "__ardublockDigitalWrite" to set the pin state. This used to make sure the pin was actually set for output at the time of the 'Write' - this was a good idea as without it some code get broken. Can it be changed back without breaking any of the "new stuff"?
One example.
This sketch
produces this code
int _ABVAR_1_pin_var = 0 ;
void setup()
{
pinMode( _ABVAR_1_pin_var , OUTPUT); // Ooops! pin 0 set to OUTPUT instead of pin 4 !
_ABVAR_1_pin_var = 4 ;
}
void loop()
{
digitalWrite(_ABVAR_1_pin_var , HIGH);
}
Another example, some hardware can use the same pin for input and output. This used to work...
The DigitalOutputBlock no longer uses a function "__ardublockDigitalWrite" to set the pin state. This used to make sure the pin was actually set for output at the time of the 'Write' - this was a good idea as without it some code get broken. Can it be changed back without breaking any of the "new stuff"?
One example. This sketch
produces this code
Another example, some hardware can use the same pin for input and output. This used to work...
But now it doesn't (DigitalOutputBlock now just sets pinMode once in setup) ...
See pull request #146