Description
Using analog messages (ANALOG 0xE0 and EXTENDED_ANALOG 0xF0-0x6F) we can control individual PWM and Servo pins. It is not possible to set the state of a digital output pin.
When a client system needs to set a digital output port, it must now first query the state of the port, mask the pin state and write the port's state back to the Arduino.
My proposal is to extend the analog messages to enable setting digital output pins. A 0 value would then map to LOW and any non-zero value would map to HIGH.
This would also be more consistent with the Pin State Query en Set Pin Mode commands.
I realize it's a bit odd writing a digital value using an analog message, but i.m.h.o. this is due to an inconsistency in the Firmata protocol itself: analog messages sent by the Arduino reflect the state of the true analog pins, where analog messages received by the Arduino are mapped to digital (PWM and Servo) pins.