Stepper motors and accelerometer

I'm working on real time monitoring of three motors with mpu6050 accelerometer. I have this code only with mpu6050 where it sends data to serial monitor. Is it possible to simultaneously run stepper motors and accelerometer? And perhaps it can be done with two arduinos, master and slave, one for steppers other for accelerometer?

Yes you can run "simultaneously". You must eliminate all delay() calls so nothing gets blocked. Here are a few tutorials that illustrate how to do this:

Example-code for timing based on millis()

Arduino Multiple Things

Several Things at a Time

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.