View Single Post
  #5   Spotlight this post!  
Unread 30-04-2010, 00:43
keen101's Avatar
keen101 keen101 is offline
Ubuntu Linux User
no team
Team Role: College Student
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Loveland, CO
Posts: 228
keen101 is a jewel in the roughkeen101 is a jewel in the roughkeen101 is a jewel in the roughkeen101 is a jewel in the rough
Re: Parallax and speed controllers

I once used an arduino to test our victors/jaguars once. It was great. It was fast and simple.

All i had to do was use the old <ServoTimer1.h> from ladyada and use the following code. http://www.ladyada.net/make/mshield/use.html

Code:
#include <ServoTimer1.h>

ServoTimer1 servo1;
ServoTimer1 servo2;

void setup() {
  Serial.begin(9600);           // set up Serial library at 9600 bps
  Serial.println("Servo test!");
  servo1.attach(10);
  servo2.attach(9);
}


void loop() {
  Serial.print("tick");
  servo1.write(180);
  servo2.write(0);
  delay(1000);

  Serial.print("tock");
  servo1.write(0);
  servo2.write(180);
  delay(1000);
}