Society of Robots - Robot Forum

Software => Software => Topic started by: Elias1001 on January 10, 2009, 01:48:02 PM

Title: $50 robot programming question
Post by: Elias1001 on January 10, 2009, 01:48:02 PM
I'm at the programming stage of the $50 robot. Should I program the robot by uploading the complied photovore hex file first? or should I first upload the hex file for setting the servo to 0 and modify the servo before the photovote file? or does it matter what order it is done in?

Also, how to I download the hex file for setting the servo to 0? I click on the link http://www.societyofrobots.com/downloads/hold_servo.hex and it gives me the hex code, but I don't know how to turn it into a format that AVR studio will understand. Someone asked the same question here http://www.societyofrobots.com/robotforum/index.php?topic=2499.0 but the thread just went extremely off topic and it wasn't really answered satisfactorially.

Edit:
Would I just be able to right click on the hex code here, http://www.societyofrobots.com/downloads/hold_servo.hex and click save page as, then change the file type to all files, and then change it to a hex file by changing the name of the file to hold_servo.hex?
Title: Re: $50 robot programming question
Post by: frodo on January 10, 2009, 02:08:26 PM
hi, i don't think it matters what order you download them in but i think you have to set the servos and modify them first before doing the photovore programming. this should work in theory. lol
Title: Re: $50 robot programming question
Post by: Webbot on January 10, 2009, 07:02:04 PM
In AVR studio:
clicon on the black box icon that says 'AVR' to pop up a new dialog
If it asks you to 'Select AVR programmer'  then click AVRispMKII in the left box and USB in the right hand Port box.
In the main download box you should see 3 sections: Flash, EEPROM and ELF.
In the Flash area it says 'Input HEX file' followed by a text box followed by a '...' button.
Click on '...' to browse and select the 'hold-a-servo.hex' file
Then click on Program


Its worth centering your servos first before using photovore. If your servos are centered then the photovore program will do SOMETHING-but not what you might expect.
Title: Re: $50 robot programming question
Post by: tristantech on January 10, 2009, 10:46:23 PM
Quote
http://www.societyofrobots.com/downloads/hold_servo.hex and it gives me the hex code, but I don't know how to turn it into a format that AVR studio will understand.

.hex files are compiled programs. They can't be easily turned back in to source code.
Title: Re: $50 robot programming question
Post by: Jdog on January 11, 2009, 12:14:09 PM
I recommend uploading the center servo code to the mcu first and modding your servos before you upload the photovore code so that when you do use the photovore code, everything will work right.

If you are using Ponyprog, you can copy and paste all the text in the page he gives you and put it in notepad. Then save the file as center_servo.hex, but make sure when you save the file, right below where you type in the name it says all files, not .txt.
Title: Re: $50 robot programming question
Post by: Elias1001 on January 15, 2009, 02:18:52 PM
I recommend uploading the center servo code to the mcu first and modding your servos before you upload the photovore code so that when you do use the photovore code, everything will work right.

If you are using Ponyprog, you can copy and paste all the text in the page he gives you and put it in notepad. Then save the file as center_servo.hex, but make sure when you save the file, right below where you type in the name it says all files, not .txt.

Thank you Jdog, that answered my question.
Title: Re: $50 robot programming question
Post by: fuzzyt on January 15, 2009, 04:54:10 PM
To download the hex files, simply right click and select "Save Taget as..."
Title: Re: $50 robot programming question
Post by: omar on August 30, 2009, 03:09:05 AM
Hello, i wanna know how can i get a code for a project, i wanna make like the accelerometer which serves the servo motor, i have the sensor which i bought from Dimension Engineering , i have the hardware, but i don't know how to connect them and how to write a code to program the pic microcontroller.
help me please  :-\
Title: Re: $50 robot programming question
Post by: Jdog on September 08, 2009, 03:00:47 PM
Make a new topic.