Coder Social home page Coder Social logo

re-5.6.0-servo_control_with_python's Introduction

๐Ÿค– Raspberry Pi Lab - Servo Control

๐Ÿค“ Overview and learning outcomes

Servos are incredibly versatile actuators. Robotic systems requiring precision contol utilize them. Students will become familiar with the basic operations of a servo motor.

Lab Setup

Electronics Components

You will need the following components from your kit for this assignment:

  • Raspberry Pi
  • Several Jumper Wires (see diagrams below)
  • HiTec Servo

Prototpypes

Construct the prototype using the diagram below:

The Servo Circuit

Procedure: Code Execution

  • Prerequisites:

    1. SSH connection to your Raspberry Pi (Using the Secure Shell App)
    2. Install Git on your Raspberry Pi (Should already be installed)
  • Get the code and run the script:

    git clone https://github.com/WHS-Robotics-Engineering-2022-23/5-6-0-Servo_Control_with_Python-[your username]

    cd 5-6-0-Servo_Control_with_Python

    sudo python3 main.py

If everything is connected properly, your servo should be moving through several positions. Feel free to mess around with the code a little if you like.

Further learning:

To learn more, try this video:

Alt text

A more detailed and complex application for a servo may be found here.

๐Ÿ“ Next steps (Graded)

Now that you know how the sensor runs and can see how some of the code works, answer the following questions. Save them in a markdown file in this repo named, "observations.md". Shoot a video of your working servo using the code you were provided. Also, modify the code in your own way to change the behavior of the servo in order to demonstrate you understand the coding at a basic level. Push that new script to this repo and include a video of that as well in your "observations.md" file.

Questions:

  1. In what various ways does the servo behave differently than a DC motor?
  2. What makes the use of a servo more complex (remember that if you were controlling a DC motor with a Pi, you would need to write some code)?
  3. What applications do you think servos are appropriate for? Explain.

๐Ÿ“š Resources

SparkFun Electronics - Servos Explained

re-5.6.0-servo_control_with_python's People

Contributors

stcline avatar

Stargazers

 avatar

Watchers

 avatar

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.