-
Notifications
You must be signed in to change notification settings - Fork 152
Description
In order to support a change from defaulting all pins to OUTPUT on startup, to defaulting to INPUT, we will need the ability to enable individual digital pins rather than entire digital ports.
0 START_SYSEX (0xF0)
1 REPORT_DIGITAL_PIN (0x63)
2 pinNumber (0 - 127)
3 reportingEnabled (0 | 1)
4 END_SYSEX (0xF7)
Once this is in place, digital port reporting (0xD0) should be deprecated. The reason is that when the pin mode is set to INPUT (electrically much safer and should also fix issues users have with relays) rather than OUTPUT by default, non grounded pins (or pins without pull-ups enabled) will report stray voltages and DIGITAL_MESSAGE would report these as pin changes. When REPORT_DIGITAL_PIN is added, Firmata should not report a pin value for any pin that is not enabled (much like how analog pin reporting currently works). This will prevent reporting stray voltages as input pin state changes.