From the course: Learning Arduino: Interfacing with Analog Devices

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Using a joystick to control a motor

Using a joystick to control a motor - Arduino Tutorial

From the course: Learning Arduino: Interfacing with Analog Devices

Start my 1-month free trial

Using a joystick to control a motor

- [Instructor] In this project, I'm going to use the joystick to control the direction and the speed of the stepper motor. For demo purposes, I'm going to use the X-axis to control the movement. In other application, you might need to use the two axises to control the movement of two motors and so on. For our project, we are going to move the motor clockwise and counterclockwise. So if I'm moving the joystick toward the pins, the motor moves clockwise and the speed will change accordingly. The same thing happens when I'm moving away from the pins when using the joystick. The motor moves counterclockwise and the speed changes clockwise, as well. We are using the values right from the joystick and map them to change the speed of the stepper motor.

Contents