Skip to content

setDigitalPinValue method creates a DIGITAL_MESSAGE message instead of a SET_DIGITAL_PIN_VALUE message #37

Open
@HawaiianSpork

Description

@HawaiianSpork

This method is called setDigitalPinValue but it actually builds a DIGITAL_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 since SET_DIGITAL_PIN_VALUE changes the value of a single pin where DIGITAL_MESSAGE changes the value for all pins on a port.

DIGITAL_MESSAGE
https://github.com/firmata/arduino/blob/master/FirmataConstants.h#L38

SET_DIGITAL_VALUE
https://github.com/firmata/arduino/blob/master/FirmataConstants.h#L44

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.5.xPlanned for 2.5.x release

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions