• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Circuit Ideas for You

Get free circuit ideas online.

  • Home
  • Privacy Policy
  • About
Home » Arduino and Joystick LED Controller Circuit

Arduino and Joystick LED Controller Circuit

Last updated on 25 November 2025 by Admin-Lavi Leave a Comment

This project shows how to control many LEDs using one joystick and Arduino.

The joystick moves in X and Y direction.

Arduino reads this movement and turns ON or OFF the LEDs.

This Arduino and Joystick LED Controller Circuit is simple to build.

Good for beginners and Arduino lovers.

Arduino Coding:

int VRx = A0
int VRy = A1
int SW = 2

int ledUp = 8
int ledDown = 9
int ledLeft = 10
int ledRight = 11
int ledPress = 12

void setup() {
pinMode(ledUp, OUTPUT)
pinMode(ledDown, OUTPUT)
pinMode(ledLeft, OUTPUT)
pinMode(ledRight, OUTPUT)
pinMode(ledPress, OUTPUT)
pinMode(SW, INPUT_PULLUP)
}

void loop() {
int x = analogRead(VRx)
int y = analogRead(VRy)
int swState = digitalRead(SW)

digitalWrite(ledUp, y < 400)
digitalWrite(ledDown, y > 600)
digitalWrite(ledLeft, x < 400)
digitalWrite(ledRight, x > 600)
digitalWrite(ledPress, swState == 0)
}

Coding Explanation:

  • analogRead reads the joystick voltage.
  • Values go from 0 to 1023.
  • Middle value is around 512.
  • If joystick moves up, y value becomes low.
  • If joystick moves down, y value becomes high.
  • Same for left and right with x value.
  • digitalWrite HIGH turns LED ON.
  • LOW turns LED OFF.
  • Switch in joystick gives 0 when pressed.

Circuit Working:

Arduino and Joystick LED Controller Circuit Diagram

Parts List:

ItemQuantity
Resistors 220Ω 1/4 watt5
Arduino UNO1
Joystick Module1
LEDs 5mm any5
USB Cable1

The joystick has two potentiometers inside.

One for X direction and one for Y direction.

When we move the stick, the voltage changes.

Arduino reads this voltage on A0 and A1 pins.

According to movement, Arduino turns different LEDs ON.

When joystick goes up, one LED glows.

When joystick goes down, other LED glows.

Right and left also glow different LEDs.

Center position means no LED or one LED.

How to Build:

To build a Arduino and Joystick LED Controller Circuit following are the steps we need to follow:

  • Gather all the parts as shown in circuit diagram.
  • Joystick VRx pin goes to Arduino A0.
  • Joystick VRy pin goes to Arduino A1.
  • Joystick SW pin goes to Arduino D2.
  • Joystick VCC pin goes to Arduino 5V.
  • Joystick GND pin goes to Arduino GND.
  • LED 1 anode goes to pin 8 through 220 ohm resistor R1.
  • LED 2 anode goes to pin 9 through 220 ohm resistor R2.
  • LED 3 anode goes to pin 10 through 220 ohm resistor R3.
  • LED 4 anode goes to pin 11 through 220 ohm resistor R4.
  • LED 5 anode goes to pin 12 through 220 ohm resistor R5.
  • All LED cathodes go to GND.

Conclusion:

This project is easy as it teaches how to read joystick values and control LEDs.

It is good for learning analog input.

We can also use this idea for robot control or game projects.

This Arduino and Joystick LED Controller Circuit is simple with low cost and fun.

References:

LED control with joystick

Filed Under: Arduino Projects, LED and Lamps

About Admin-Lavi

Lavi is a B.Tech electronics engineer with a passion for designing new electronic circuits. Do you have questions regarding the circuit diagrams presented on this blog? Feel free to comment and solve your queries with quick replies

Previous Post: « Measuring Bend Angle using a Flex Sensor Circuit
Next Post: Simple Sound Sensor Circuit with Arduino »

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar




Categories

  • Alarm Circuits (47)
  • Amplifier Circuits (67)
  • Arduino Projects (100)
  • Audio Circuits (116)
  • Automobile Circuits (19)
  • Battery Charger Circuits (65)
  • Free Energy (13)
  • Heater and Temperature Controllers (13)
  • High Voltage (1)
  • Indicator Circuits (46)
  • Inverter Circuits (20)
  • IoT projects (1)
  • LDR Circuits (26)
  • LED and Lamps (150)
  • Meters and Testers (31)
  • Motor Controllers (22)
  • Oscillator Circuits (40)
  • Power Supply Circuits (115)
  • Remote Control Circuits (10)
  • Security and Protection (29)
  • Sensors and Detectors (127)
  • Solar Circuits (29)
  • Timer Circuits (41)
  • Transistor Circuits (93)
  • Transmitter Circuit (17)
  • Tutorials (8)
  • Water Level Controller (7)

Recent Posts

  • Simple 12V Power Supply Circuit with Filter Capacitor
  • 5V High Current Buck Converter Circuit using IC MC34063
  • 5V USB to 1.5V or 3V DC Converter Circuit
  • 12V to 5V Buck Converter Circuit using Transistors
  • IC 7805 12V To 5V 2A Boost Converter Circuit

Recent Comments

  1. TDHofstetter on DIY Variable Power Supply Circuit using Arduino
  2. feathbuff on Simple Micro Ampere Meter Circuit
  3. Admin-Lavi on Simple School Project Multimeter Circuit
  4. choke on Simple School Project Multimeter Circuit
  5. Admin-Lavi on Analog to Digital Converter Circuit using IC 555

Copyright © 2026 | New Circuit Ideas