Lab 7

Submitted by zwasson on Tue, 03/19/2013 - 20:18

Description

The purpose of this lab was to create a crawler using a servo motor. For this lab, I created a "two-legged" crawler, where each leg is a key. The two keys are quite different in size which makes the crawler turn slightly to the right over time. If the crawler is positioned as shown in the picture below, it will slowly walk forward. Ideally it would move faster, but the keys tend to slip quite a bit on smooth surfaces. The idea behind this crawler relates to how we always seem to misplace our keys; perhaps sometimes our keys actually run away from us.

Components

  • Arduino Uno
  • Servo Motor
  • 2 Keys

Code

/*
  Lab7
  This lab uses servo motors to create a crawler
  
  Zach Wasson
 */
 
#include <Servo.h>
 
Servo servo;
 
void setup() {
  servo.attach(9, 3500, 6350);
}
 
void loop() {
  servo.write(0);
  delay(500);
  servo.write(180);
  delay(500);
}
 

 

key_crawler.jpg
0
Your rating: None
Drupal theme by Kiwi Themes.