Hi, I'm a beginner to C programming.
From what i've read, "void setup" is for code I want to execute just once at the beginning. And "void loop* is for main code that gets executed repeatedly.
I want to initialize a motor and leadscrew to a home position once. Then execute my main code repeatedly.
When I put the initialize code in "void setup" I get an error message to the effect that I cant do that.
The code is good because when I put it at the top my "void loop" code it works fine, but repeatedly that I dont want it to do.
So my questions are:
- does any coding get done in "void setup"?
- how can I make code in "void loop" only execute once the first time through?