Jetson code for stepper motor

I want to drive stepper motor with Jetson but I could not find any coding source for driving the stepper motor with Jetson. So I need your help on a few issues.

  1. If we connect Jetson and stepper motor driver directly and run the necessary codes on it. How it will effect the processor? Will it cause a slowdown in the processing of datas from 3D Camera and 2D Lidar? And Can you share the neccesary code for Jetson?

  2. If we connect Jetson to Arduino and connect it to the stepper motor driver and only take the direction and angle for the stepper motor from Jetson, Will it help us decrease the load of processor? Will the reaction time of stepper motor slow down because of an additional component?

  3. Which option should we prefer and why?

Thanks,

!
!

Hi @mskilic46, others from the community may have more specific recommendations and experience, however controlling a motor via GPIO typically would not cause that much CPU overhead. I suppose it is related to how fast your control loop is running and how fast you are issuing motor commands. If you run this motor control in a different CPU thread, then you can use one of the other CPU cores for it.

If you are using Python, you can see the jetson-gpio library for controlling the GPIO signals.

You could try option (1) first and see if it provides the resolution that your stepper motor needs for your desired accuracy.

1 Like

Thanks for your help.