Skip to content

clarity on write method #51

Description

@bsutton

From the documentation I can find, its not clear what gpio.write(true) does.

The code does a native write of 1 or 0 but how does this relate the pin state of high or low?

if 1 is high and 0 is low, then I would suggest that the api would be more self explanatory if the write took an enum similar to:

enum PinState {
high(1),
low(0),

int value;

PinState(this.value);

}'
gpio.write(PinState.low);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions