Joystick Madness

Objective

Control the spin of the motor with the joy stick

Code

Joystick Madness

 

 

 

 

Arduino Instructions

  • Connect a wire from the 5V to the power rail and another from GND to the ground.

Let’s first connect the joystick. Take three female-to-male wires:

  1. Connect the female (the open one) to the GND of the joystick and the male (with the metal pin sticking out) to ground rail on the breadboard.
  2. Connect the female (the open one) to the +5V of the joystick and the male (with the metal pin sticking out) to the power rail on the breadboard.
  3. Connect the female (the open one) to the of the joystick and the male (with the metal pin sticking out) to AO on the Arduino.

Let’s connect the Micro Servo.

  1. Place it flat on the floor. Flatten the wire and unwind the twists. The orange wire is input. The middle is power. The brown wire is ground.
  2. Connect a wire from the input to pin 8.
  3. Connect a wire from the power wire to the power rail on the breadboard.
  4. Connect a wire from the ground wire to the ground rail on the breadboard.

Now upload your code and move the joystick to turn the Micro Servo.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: