You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One one hand this points out that I need to update the Firmata implementation to use INPUT_PULLUP, something I should have probably added long ago. On the other hand this is an inconsistency so just calling that out.
The following does not work on SAMD boards either:
byte pin = 2;
pinMode(pin, INPUT);
digitalWrite(pin, HIGH); // enable pull-ups// some time laterdigitalRead(pin); // does not work
However this works (as expected):
byte pin = 2;
pinMode(pin, INPUT_PULLUP);
// some time laterdigitalRead(pin); // value is readable
Personally I don't mind this and think it's the best way to go forward, but it was unexpected as it does work on all non SAMD architectures (including SAM) so the Arduino pinMode and digitalRead documentation should be updated for Zero if this change is intentional.
I noticed while trying to add Arduino Zero support for Firmata that the following line fails: https://github.com/firmata/arduino/blob/master/examples/StandardFirmata/StandardFirmata.ino#L266.
After that point, digital input will not work on that pin (it's not permanently broken as in fried input pin or anything like that though). This has never been an issue for other architectures.
One one hand this points out that I need to update the Firmata implementation to use
INPUT_PULLUP
, something I should have probably added long ago. On the other hand this is an inconsistency so just calling that out.This may be the same issue as #28.
The text was updated successfully, but these errors were encountered: