SIK-Guide-Code icon indicating copy to clipboard operation
SIK-Guide-Code copied to clipboard

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

Open agy-why opened this issue 4 years ago • 0 comments

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

agy-why avatar Feb 07 '21 23:02 agy-why