go_away

Author Topic: Modifying a servo with the Roboduino  (Read 2737 times)

0 Members and 1 Guest are viewing this topic.

Offline RoBoTicSTopic starter

  • Full Member
  • ***
  • Posts: 80
  • Helpful? 0
  • Man is a robot with defects
Modifying a servo with the Roboduino
« on: January 04, 2009, 09:46:28 PM »
Okay I am trying to modify the HS-311 servo using a Roboduino. 

I am using the arduino program and when I upload this program to the microncontroller it says     Done  Uploading

#define Servo 5  // digital pin 5, PWM pin

void setup() {
 
  pinMode(Servo, OUTPUT);
  digitalWrite(Servo, LOW);
}

void loop(){
  digitalWrite(Servo, HIGH);           
  delayMicroseconds(1500);       
  digitalWrite(Servo, LOW);   
  delayMicroseconds(8500);       
}


I wait for the gears to start moving but nothing happens why?  I have the servo connencted to digital pin 5.

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: Modifying a servo with the Roboduino
« Reply #1 on: January 04, 2009, 11:07:42 PM »
Guess what? You need to move the power selection jumper in the position closer to the power barrel and power the board from a battery. The PWM pins get power directly from the battery, so if the board is powered from the USB the servo will not move. Also, keep in mind that it is best to use the exact battery the robot will use to power the servos at the moment you are modifying the servo. Otherwise you may end up with a slow movement when you send it the center (stop) signal.
Check out the uBotino robot controller!

Offline RoBoTicSTopic starter

  • Full Member
  • ***
  • Posts: 80
  • Helpful? 0
  • Man is a robot with defects
Re: Modifying a servo with the Roboduino
« Reply #2 on: January 05, 2009, 05:06:44 AM »
Okay thanks I had no clue

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: Modifying a servo with the Roboduino
« Reply #3 on: January 05, 2009, 07:01:52 AM »
You're wellcome. There is't much info about using the Roboduio board yet. Airman00 is working on a Getting Started document, but until it's done, I'll answer all your questions in the forum. I am trying to replicate whatever people are doing so I can figure out what they are doing wrong. I am working on a robot that will use lots of servos(wheels, gripper, pan/tilt head), a few sensors, AVRcam, serial LCD. It's on my test bench now to test the AVRcam code. I am using the SoftwareServo library to drive the servos, SoftwareSerial library to transmit to the LCD and the AVRcam library for object (color blob) recognition. It will take some time until it's going to be ready though.
Check out the uBotino robot controller!

Offline RoBoTicSTopic starter

  • Full Member
  • ***
  • Posts: 80
  • Helpful? 0
  • Man is a robot with defects
Re: Modifying a servo with the Roboduino
« Reply #4 on: January 05, 2009, 09:32:59 AM »
Okay Just post up some pics when you finished

I am working on a type of the fifty dollar robot it is just different.  I am still going to use a photovore algorithm. I was just hoping that somebody could help me write the program to upload to my board.

Also I just finished both of my photoresistor where do I plug them in?

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: Modifying a servo with the Roboduino
« Reply #5 on: January 05, 2009, 04:31:01 PM »
I think you need to plug them to the analog pins. Try analog 0 and 1. I will help you to write the code. Take some time to read the Arduino Programming Notebook (see this thread: http://www.societyofrobots.com/robotforum/index.php?topic=6328.0). At the end there are some examples how to interface and read different sensors and motors. I will take a look at the $50 photovore code to see if I can translate it to Arduino.
Check out the uBotino robot controller!

Offline RoBoTicSTopic starter

  • Full Member
  • ***
  • Posts: 80
  • Helpful? 0
  • Man is a robot with defects
Re: Modifying a servo with the Roboduino
« Reply #6 on: January 05, 2009, 06:21:30 PM »
okay thanks I am starting to read it now.

 


Get Your Ad Here

data_list