Hello.
The tutorial you linked to on Arduino’s website does not apply to our A4988 carrier since the tutorial just uses H-bridges, which makes control more complicated. You should refer to the wiring diagram you linked to on our website; it is our recommended minimal wiring diagram for our A4988 carrier. If you need help getting started, you might find this guide posted by decrDude on our forum helpful. You could also look at this blog post with a video we made about how to set the current limit on our driver carriers.
I also recommend breaking your project into smaller parts. I would recommend getting the stepper motor to move and read the analog signal separately, and combining those things when you have each part working on its own.
- Grant