Iam new to Arduino & C language.
I need to control stepper motor with different combinations of forward speed & reverse speed and number of rotations.
We need 300 settings for our application. For each setting, 4 digit code from Hexpad programmed to call while function as mentioned in code.
My project requirement is while function should run indefinitely with present key input and break the present while function & go to the next selected while function.
4 digit Hexpad key code is as follows
10AB, 10AC, 10AD, 10AB....
Iam forwarding my code.
With my code two problems encountered
- Till 10AD, while function starting after completion of 4 digit input command.
After inclusion of while command with 10BA, the function starting with only pressing of 10A
and it is not waiting till the completion of 4 digit code.
Please suggest me how to write 4 digit code for each setting.
- I have written a code for while function for each setting,
please suggest me how to break while function as soon as new 4 digit code
entered from HEX keypad and starts new while function.
stepper.txt (5.28 KB)