Open HawaiianSpork opened 4 years ago
Support of that message was added in v2.5 of the protocol. Currently firmata4j targets 2.3. We should add support of 2.4 features of the protocol before switching to that message to set pin's value.
Previous attempt to fix it #59 was reverted in #63
This method is called
setDigitalPinValue
but it actually builds aDIGITAL_MESSAGE
message:https://github.com/kurbatov/firmata4j/blob/master/src/main/java/org/firmata4j/firmata/FirmataMessageFactory.java#L226
If you are using
StandardFirmata.ino
this can result in the wrong pin being changed sinceSET_DIGITAL_PIN_VALUE
changes the value of a single pin whereDIGITAL_MESSAGE
changes the value for all pins on a port.DIGITAL_MESSAGE
https://github.com/firmata/arduino/blob/master/FirmataConstants.h#L38SET_DIGITAL_VALUE
https://github.com/firmata/arduino/blob/master/FirmataConstants.h#L44