Supplier photo of an assembled radio kit with a purple circuit board, telescopic antenna and clear case.
Supplier photo
Temu affiliate offer · Project idea

Build a radio

Soldering required. Check the supplied parts and board revision.

View kit on Temu

Tricky Circuit may earn a commission through these links. Product ideas have not been bench-tested by Tricky Circuit and are not verified lesson parts lists.

🎮🔥 Controlling your SG90 servo with a joystick will feel like operating a mini robotic arm! Let’s get started.


🔹 Components Needed

✅ Arduino (Uno/Nano/etc.)
✅ SG90 Servo Motor
✅ Joystick Module (XY type, like KY-023)
✅ Jumper Wires & Breadboard


🔹 Understanding the Joystick

The joystick has two potentiometers (X & Y) and a push button:

  • VRX (X-axis): Analog signal (A0)
  • VRY (Y-axis): Analog signal (A1)
  • SW (Button): Digital signal (D2, optional)
  • VCC & GND: Power

For this setup, we’ll control the servo using the X-axis (left/right movement).


🔹 Circuit Connections

Joystick PinArduino PinServo Pin
VCC5V5V
GNDGNDGND
VRX (X-axis)A0—
VRY (Y-axis)A1 (optional)—
SW (Button)D2 (optional)—
——Pin 9 (Servo Signal)

🔹 Arduino Code (Joystick-Controlled Servo)

#include <Servo.h>

Servo myServo;
int joyX = A0;  // Joystick X-axis connected to A0
int xValue;      // Variable to store joystick reading

void setup() {
    myServo.attach(9);  // Servo on Pin 9
}

void loop() {
    xValue = analogRead(joyX);  // Read joystick X-axis (0-1023)
    int angle = map(xValue, 0, 1023, 0, 180);  // Convert to 0-180°
    
    myServo.write(angle);  // Move servo to the corresponding angle
    delay(15);  // Small delay for smooth movement
}

🔹 How to Test It?

1️⃣ Wire up the circuit as shown.
2️⃣ Upload the code to your Arduino.
3️⃣ Move the joystick left & right → The servo should move accordingly! 🎮🤖


🔹 What’s Next?

🔥 Add Y-axis → Control two servos (X for one, Y for another).
🔥 Use the button → Make it reset the servo to center (90°).
🔥 Upgrade to a robotic arm → Control servo-based grippers or a full arm!

📡Broadcast the signal — amplify the connection.

Leave a Reply

Temu affiliate offers

Find your next electronics project

Explore these do-it-yourself project kits. Check the selected option, included parts and instructions on each offer.

Tricky Circuit may earn a commission if you buy through these Temu affiliate links. These are product ideas; they have not been bench-tested by Tricky Circuit and are not verified lesson parts lists.

Supplier photo of an assembled infinity mirror light cube illuminated on a dark background.

Supplier product photo

Build an infinity light cube

Listing specifies 5-volt direct current. Soldering required; battery and glue not included.

View kit on Temu

Supplier photo of a breadboard, jumper wires and assorted electronic components in a plastic storage case.

Supplier product photo

Try breadboard experiments

Breadboard, wires and assorted parts. Arduino controller board not included.

View kit on Temu

Supplier photo of an assembled blue surface-mount soldering practice board with a circular ring of small lights.

Supplier product photo

Solder a chasing-light board

Surface-mount soldering practice. Battery and battery holder not included.

View kit on Temu