You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
Dear SparkFun,
In the tutorial DistanceSensor the pin are defined for the first time as
const int
, instead ofint
. 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
The text was updated successfully, but these errors were encountered: