I would like to create variables to call stepper motor sequences in my program

Hello community 🙂, I have a small question. I would like to create variables to call stepper motor sequences in my program. For now, I have written some sequences for 3 motors that are triggered by touch buttons on my HMI. But I realize that this will be very, very long. 😔 So I want to create sequences and save them under a name. I imagine that's what you call a variable??? So that I only have to call the names I gave to the sequences afterward. I am using the AccelStepper library. What type of variable should I use? Const int? Const char? Const float?
Solution:
Use an integer array (int[]) or a struct with integer members to store stepper motor sequences. For sequence names, use an enumeration (enum) or a string array (char[] or String[]). This will allow you to easily access and call the sequences by their index or name.
Jump to solution
1 Reply
Solution
Joseph Ogbonna
Joseph Ogbonna•6mo ago
Use an integer array (int[]) or a struct with integer members to store stepper motor sequences. For sequence names, use an enumeration (enum) or a string array (char[] or String[]). This will allow you to easily access and call the sequences by their index or name.
Want results from more Discord servers?
Add your server