You can control a stepper by writting your own code using this library in Millumin. You will also need a library to control the stepper such as this one.
Regarding the diagram, you will need a driver. The selection of this driver depends on the type of motor you have, and it's usage.
The function MilluminStream::update() is basically doing a serial.update() (looking for packets for be sent via serial port), but there is also a delay().
First of all, be sure Millumin does not sent data to your Arduino via the serial port (quitting Millumin is the easiest way). Then add the instruction MilluminStream::setLoopIdleTime(0) so there is no delay any more. I guess this is what is making stepper.run() behaving strangely.
If it works fine, goes on with Millumin controlling your stepper ...
Comments
I'm trying the Accelstepper library but seems that can't work smooth together with "MilluminStream" VIDEO->https://youtube.com/shorts/dn1th3vWwag
Probably the serial port is interrupting the stepper "feed" ?
I'm trying to pass the value of "MoveTo" by timeline in Millumin.
Hardware: Mega 2560, CNC shield, Nema17
Can someone point me in the right direction to test further?
Did Teensy can operate smoother maybe?
Thanks for your attention.
Hello @Torg097,
The function
MilluminStream::update()
is basically doing aserial.update()
(looking for packets for be sent via serial port), but there is also adelay()
.First of all, be sure Millumin does not sent data to your Arduino via the serial port (quitting Millumin is the easiest way). Then add the instruction
MilluminStream::setLoopIdleTime(0)
so there is no delay any more. I guess this is what is makingstepper.run()
behaving strangely.If it works fine, goes on with Millumin controlling your stepper ...
Best. Philippe