Skip to content

Suggestion: Progressive Pin definition from int, const int to MACRO. #34

@agy-why

Description

@agy-why

Dear SparkFun,

In the tutorial DistanceSensor the pin are defined for the first time as const int, instead of int. I think it is a great opportunity to introduce constants.

However I found that such values like pin ID may not need a variable and I believe can be solved via a MACRO definition since the latter do not require memory space.

As a results I could imagine introducing const int in the second project and #define XXX_PIN YY in the third project. The advantage being a smooth learning curve and introducing the challenges of memory management in embedded systems.

Thank you for your work, and your contributions to the open hardware community,

I wish you a nice day,

Yori

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions