Skip to content

Consider separating the concept of pin modes and configuration #190

@soundanalogous

Description

@soundanalogous

Currently pin modes contain a mix of actual pin modes (digital in, digital out, pwm, etc) and configuration (Servo, OneWire, Encoder, etc). A better approach would be to separate these concepts. Pin modes should be the actual HW modes supported by each pin on a board. For example:

OUTPUT
INPUT
ANALOG
PWM

Instead of "I2C" the modes should be:
SDA
SCL

Instead of "SPI" (if ever added to Firmata) the modes should be:
MISO
MOSI
SCK
SS

If UART support is added the modes should be:
UART_RX0
UART_TX0
If multiple UARTs
UART_RX1
UART_TX1
etc...

This concept should be distinct from hardware abstractions associated with specific pins:

Servo
Shift
OneWire (unless such a thing as HW OneWire exists on a particular board)
Encoder
Stepper

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions