Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
agy-why opened this issue Feb 7, 2021 · 0 comments
Open

Comments

@agy-why
Copy link

agy-why commented Feb 7, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant