Society of Robots - Robot Forum
Software => Software => Topic started 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?
-
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
-
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.
-
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.
-
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.
-
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.
-
To download the hex files, simply right click and select "Save Taget as..."
-
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 :-\
-
Make a new topic.