Git Product home page Git Product logo

servo_with_joystick's Introduction

Servo with Joystick

Image of 2 servos attached with long wires to an Arduino out of frame. And a joystick attached with even longer wires to the same Arduino.

Parts:

  • Arduino (an Uno should be enough)
  • A joystick
  • 2 Servos (small enough that your arduino can power them both without an external power source)
  • A breadboard (only if you want to see the wires better)

Setup:

  1. Attach the joystick
    1. VCC to 5v
    2. GND to ground
    3. HOR to an analogue input (default is 0)
    4. VER to an analogue input (default is 1)
  2. Connect the servos
    1. red to 5v
    2. black/brown to ground
    3. yellow/orange
      • X-axis/horizontal into a digital input (default is 4)
      • Y-axis/vertical into a digital input (default is 3)
  3. Change your settings in main.cpp
    • SERIAL_PRINT if you would like Serial.print debug messages
    • XPINOUT if you use a different pin for the horizontal servo
    • YPINOUT if you use a different pin for the vertical servo
    • XPININ if you use a different analogue pin for the horizontal input from the joystick
    • YPININ if you use a different analogue pin for the vertical input from the joystick
  4. Upload the program
  5. Control the servos :)

Fritzing Sketch:

A Fritzing sketch exported to a png. Showing orange wires for the horizontal servo and red for the vertical servo.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.