Code Overview, Compile and run
Let's take a look at our code, the main code will initialise the step motor object and then we'll run a demo of
different type: first demo will be to turn 1 step, then 20 steps, then quarter turn by degree and close the motor.
As we can see, we have 2 type of function:
1. turnSteps which will turn the motor by amount of stops
2. turnDegrees which we can state degrees such as 90,180,360 and it will turn it around.
We can use both functions to archive the same result in different ways.
Compile the script by going into the samples directory and running: python3 stepper.py
55 of 114
Need help?
Do you have a question about the Raspberry Pi & Arduino Starter Kit and is the answer not in the manual?