Section 4: Arduino Setup
The advanced features such as StallGuard can be purchased in our PDF guide here. |
Now that we know how a stepper motor works, we need to program our ESP32 to make it move. I have taken the time to write all the firmware myself. What we will do in this course is examine it line by line, so you understand how each part works.
Let’s open the firmware in Arduino to begin. Go to the GitHub page and open the dual_core folder. Open dual_core_simple.ino in the Arduino IDE 2.
Installing ESP Core
There is a bug in the FastAccelStepper library at the time of this library that only allows it to work with Version 2 of the ESP32 core. In Arduino open the Boards Manager and search for ESP32.
Find the board “esp32 by Espressif Systems” and install version 2.0.17
Installing Libraries
Before we begin, we'll need to install some libraries to use this sketch. Open the Arduino library manager and install the following libraries:
- TMCStepper
- FastAccelStepper
NEXT SECTION: 5
Course Sections:
- Section 0: Background
- Section 1: Hardware Setup
- Section 2: Stepper Motor Basics
- Section 3: Power Requirements
- Section 4: Arduino Setup
- Section 5: Understanding Trinamic Drivers
- Section 6: TMCStepper Library
- Section 7: FastAccelStepper Library
- Section 8: ESP32 Dual Core Setup
- Section 9: Motor Setup
- Section 10: Understanding Positioning
Advanced Sections:
1 comment
The Arduino firmware link does not work, I cannot download the sketch that the rest of the course makes reference..?
How may I get this sketch…?
Thanks