Hi all,
I want to run to parallel programs like reading sensor data and running stepper motor continuously without any time interruption.
Please suggest me how can I implement this on Arduino 2560.
Thanks.
Regards,
Kartik patel
Hi all,
I want to run to parallel programs like reading sensor data and running stepper motor continuously without any time interruption.
Please suggest me how can I implement this on Arduino 2560.
Thanks.
Regards,
Kartik patel
By never writing blocking code and never ever using delay().
Dear Awol,
For changing the step of the stepper motor, I need to give a delay between the HIgh and low sequences.
I want to do four tasks parallelly like acquire sensor data on the Analog pin, running the motor, sending data on I2c and data display on LCD.
I have tried millis() but it performs a task based on time event like blink LED after 5 seconds.
But I want to run all four tasks parallelly.
Please help me to do the same.
Regards,
Kartik Patel
Read this:
https://forum.arduino.cc/index.php?topic=223286
This is "simple" way. Search for "Arduino RTOS" for more advanced technique.