Society of Robots - Robot Forum

Mechanics and Construction => Mechanics and Construction => Topic started by: javafiend on January 23, 2008, 12:24:03 PM

Title: Code to center servo
Post by: javafiend 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!
Title: Re: Code to center servo
Post by: Trumpkin on January 23, 2008, 08:45:01 PM
Why not use Admin's code?
Title: Re: Code to center servo
Post by: Trumpkin 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/
Title: Re: Code to center servo
Post by: javafiend 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.
Title: Re: Code to center servo
Post by: airman00 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.
Title: Re: Code to center servo
Post by: javafiend 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.
Title: Re: Code to center servo
Post by: Trumpkin 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.
Title: Re: Code to center servo
Post by: javafiend 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.
Title: Re: Code to center servo
Post by: Trumpkin on January 24, 2008, 12:59:49 PM
right click and click save target as
Title: Re: Code to center servo
Post by: Trumpkin on January 24, 2008, 01:01:57 PM
I just tried it again to make sure it works. It does.
Title: Re: Code to center servo
Post by: javafiend 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 :).