Arduino Mutlitasking with millis(). The Stepper motor doesnt work, maybe affected by lcd display.

My Code is compiling and every feature is working besides the stepper motor. Does it get blocked by the lcd display, or is the stepper function itself wrong. (Comands and nessecary headers included in the headerfile)
16 Replies
0xM0n0ch70m3
0xM0n0ch70m3OP22h ago
would be nice if someone could help me since that project is due to tomorrow and today in the test we realised that the stepper is not working
DaDev
DaDev20h ago
I haven't looked at your code. But if your printing to a display yes its a blocking function
0xM0n0ch70m3
0xM0n0ch70m3OP19h ago
okay, is it blocking aswell when im doing a temporary print how do i fix it. should i use the acellStepper libraray with runSpeed()?
DaDev
DaDev19h ago
You cant fix it. What is "temporary print"
0xM0n0ch70m3
0xM0n0ch70m3OP19h ago
okay, but i definetly need that motor to run what about that accelStepper lib
DaDev
DaDev19h ago
If u remove all prints and led code does ir work?
0xM0n0ch70m3
0xM0n0ch70m3OP19h ago
indipendantly the stepper works the led code also shouldnt block due to the millis() implementation
DaDev
DaDev19h ago
Ok there you go
0xM0n0ch70m3
0xM0n0ch70m3OP19h ago
the lcd is the problem but is it also fixable if i use the accell Stepper lib since step() is blocking but stepper.runSpeed() isnt
DaDev
DaDev19h ago
You can try. Like I said I haven't seen your code
0xM0n0ch70m3
0xM0n0ch70m3OP14h ago
okay i will try by using this lib and remove the lcd stuff Seems like it didnt Work
DaDev
DaDev13h ago
I figured not.
DarwinWasWrong
DarwinWasWrong13h ago
wot is "Windkraftwerk.h" Oh - its where you define a lot of libraires, variables, sort of stuff that may be required for the code to actually compile @DaDev Stepper stepper(2048, 4, 1, 2, 0); good choices
DaDev
DaDev13h ago
I did not even look at code Its all ai crap any more
DarwinWasWrong
DarwinWasWrong13h ago
@0xM0n0ch70m3 Can we assume you have departed ?
DarwinWasWrong
DarwinWasWrong13h ago
I am off now - catch later
No description

Did you find this page helpful?