From the course: Learning Arduino: Interfacing with Analog Devices

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Using the joystick to control LEDs

Using the joystick to control LEDs

- [Instructor] In this section, I'm going to integrate couple of the components that we worked on. The first project, we are going to use LEDs with a joystick. As we move through each axis, the light intensity changes accordingly. This example can be applied as part of a project where you need to have an LED to indicate what axis you're using and what direction. And since the values of the joystick changes between zero and 1,023, then we can use these values to change the light intensity of the LED. This is done for the X-axis and for the Y-axis too. For the Z-axis, whenever we press on the joystick, a yellow LED lights up and turns off when we release it.

Contents