Using variables for pin names
chipaddict opened this issue · 1 comments
chipaddict commented
You may want to use an indirect name for A0 such as:
int flexSensor = A0;
...
myValue = analogRead(flexSensor);
ToniCorinne commented
For general coding practices, this is definitely a good point. However, the point of this code is more to act as a very basic piece of code for customers with which to practice using GitHub. Basically, the focus/purpose is on the tools themselves, not the code (as Nate says in the comments, it is designed to be bad code). This would make for a great exercise for the user to change that in the code after forking it, and seeing how the tools within GitHub enable changes like this.