Author Topic: Code to center servo  (Read 5369 times)

0 Members and 1 Guest are viewing this topic.

Offline javafiendTopic starter

  • Robot Overlord
  • ****
  • Posts: 125
  • Helpful? 0
Code to center servo
« on: January 23, 2008, 12:24:03 PM »
I've looked all around, but other than the hex file on the "How to modify a servo" page, I can't seem to find the uncompiled(?) code to center the servo.  Can anyone help me out?

Thanks!

Offline Trumpkin

  • Supreme Robot
  • *****
  • Posts: 1,176
  • Helpful? 5
Re: Code to center servo
« Reply #1 on: January 23, 2008, 08:45:01 PM »
Why not use Admin's code?
Robots are awesome!

Offline Trumpkin

  • Supreme Robot
  • *****
  • Posts: 1,176
  • Helpful? 5
Re: Code to center servo
« Reply #2 on: January 23, 2008, 08:51:49 PM »
here is a way to modify a servo with out code http://www.j4mie.org/2007/11/02/how-to-hack-acoms-as-16-servos/
Robots are awesome!

Offline javafiendTopic starter

  • Robot Overlord
  • ****
  • Posts: 125
  • Helpful? 0
Re: Code to center servo
« Reply #3 on: January 24, 2008, 07:46:15 AM »
I'm trying to use the .hex file, but I guess I just don't know how to implement it.  Do I have to use "make all" or something?  I guess at this point I am just totally lost.

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: Code to center servo
« Reply #4 on: January 24, 2008, 07:58:39 AM »
what do you mean by implement it?


You program in C or another high level language , compile it to hex, then use hardware to program the hex file to the MCU.
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline javafiendTopic starter

  • Robot Overlord
  • ****
  • Posts: 125
  • Helpful? 0
Re: Code to center servo
« Reply #5 on: January 24, 2008, 08:28:06 AM »
The link points to the hex code.  So, do I still need to compile it (I'm assuming not)?  Do I have to save it before I attempt to upload it?  What do I do with the hex code once I copy it from the link?

I am a newbie of the lowest level, so please bear with me.
« Last Edit: January 24, 2008, 08:30:43 AM by javafiend »

Offline Trumpkin

  • Supreme Robot
  • *****
  • Posts: 1,176
  • Helpful? 5
Re: Code to center servo
« Reply #6 on: January 24, 2008, 09:44:16 AM »
ok so right click on the hex code and click save target as then choose the folder you want to save it under then click save. open Pony Prog and open the folder which has the hex code.  after that plug in your robot to com port 1 and turn it on. Then click write all under command. unless you have problems like me that should be all.
Robots are awesome!

Offline javafiendTopic starter

  • Robot Overlord
  • ****
  • Posts: 125
  • Helpful? 0
Re: Code to center servo
« Reply #7 on: January 24, 2008, 10:40:01 AM »
Sounds simple enough.  Unfortunately, there is no "Save As" option for the .hex file link.  It just opens up another page.

Offline Trumpkin

  • Supreme Robot
  • *****
  • Posts: 1,176
  • Helpful? 5
Re: Code to center servo
« Reply #8 on: January 24, 2008, 12:59:49 PM »
right click and click save target as
Robots are awesome!

Offline Trumpkin

  • Supreme Robot
  • *****
  • Posts: 1,176
  • Helpful? 5
Re: Code to center servo
« Reply #9 on: January 24, 2008, 01:01:57 PM »
I just tried it again to make sure it works. It does.
Robots are awesome!

Offline javafiendTopic starter

  • Robot Overlord
  • ****
  • Posts: 125
  • Helpful? 0
Re: Code to center servo
« Reply #10 on: January 25, 2008, 08:57:18 AM »
Ok, last night I actually tried the Save Link As option.  It worked and saved the .hex file.  Now my only problem is uploading it to my board, which I can't really tell if that works.  Also, I'm using avrdude-gui and can't seem to open my COM port.  Oh well, one problem down, right :).

 


Get Your Ad Here

data_list