...... from: HePE on February 08, 2009, 02:04:31 AM Hi Metal slug 2 ............ ) The .hex file will be the product of your code after building ............ . It will be stored on the same folder where you've extracted it all the ............ you got from photovore_v1.zip. The makefile will be on this same folder. Once you have the ............ files on place here's what you do... a.) click " ............ 0 Warnings..." c.) since you have the MKII click on the AVR icon select the "AVRISP MKII" on the left ............ and USB on the right of the window that popped up.. click on ............ "connect" d.)select atmega8 in the device field. e.) ............ (i.e. Erase and verify after programming) f.) on the Flash Programming area select "Input Hex file" ............ browse for your Photovore_v1.hex by clicking on the ... icon (this file as metioned earlier ............ be on the folder where you extracted the .zip file ............ c:\My_Robots\Photovore_v1\) g.) now click on the program button on the Flash area (of course ............ MKII must be connected to your atmeag8 and the circuit powered-on ............ helps. If you still bump into troubles just keep on posting. Also see this http://www. ............ the terms of the GNU General Public License version 2 as * published by the Free Software ............ drive straight /****************INITIALIZATIONS*******************/ //other stuff Im ............ //timerInit(); // initialize the timer system configure_ports(); // configure which ports are ............ etc. a2dInit(); // initialize analog to digital converter (ADC) a2dSetPrescaler(ADC_PRESCALE_DIV32); ............ // configure ADC scaling a2dSetReference( ............ ); // configure ADC reference voltage //rprintf(" ............ BELOW THIS LINE **********/ LED_off();//turn LED on while(1) { //store sensor data int loops= ............ (24); i--; } */ //rprintf("Initialization Complete\r\n"); //output message to serial ( ............ (500);//a small delay to prevent crazy oscillations } } /*********ADD YOUR CODE ABOVE THIS ............ wait for a certain amount of time with this function. Put the number of computational cycles to delay ............ the (). 23 cycles is about .992 milliseconds to calculate: 23/.992*(time in milliseconds to ............ Check servo datasheet where it says: 'Direction: Clockwise/Pulse Traveling 1500 to 1900usec' ............ is for port D0 and right is for port D1. LED_on(); and LED_off(); Turns on and off your LED. The ............ is on port D4. By bringing port D4 low, you are turning ............ the LED. variable=a2dConvert8bit(pin); Reads analog pin. For example, set ' ............ *******************/ OK heres what i do, and its not working, maybe theres something I'm doing wrong( ............ . 2. copy everything (except the Photovore_v1.aws files) from the Photovore folder into the Test_Stuff ............ source code to the Test_Stuff.c source file which was initially created 4. mod the source ............ what "g" posted earlier 5. now i click Project>configuration options and a box opens up. 6. i click ' ............ external makefile' 7. THIS IS WHERE IM CONFUSED: when i look for ............ makefile, i find two: one in the Test_Stuff folder with ............ other copied stuff from the photovore folder and another makefile found in the 'default' folder found ............ /Default)(why is that even there?). i choose the one found in Test_Stuff the and click 'OK'. 8. i ............ Build>Rebuild All 9. THIS IS WHAT I DONT UNDERSTAND: everything compiles OK, but on the ' ............ dot and a message saying: gcc plug-in: Error: Object file not found on expected location C:\Users\ ............ \Test_Stuff\Test_Stuff.elf Make sure your makefile specifies the output .elf file as Test_Stuff.elf ............ . it says something about the makefile..so i open the makefile up and find this: # ............ file name (without extension). TARGET = Photovore_v1 ............ notice that the targets name is Photovore_v1, yet my ............ , so i change Target to this and save the Makefile: # Target file name (without extension). TARGET = ............ Test_Stuff 11. I redo step #7, nothing happens, i redo step #8 12. This time i get 4 ............ : 'count' undeclared (first use in this function) Test_Stuff.c:58: error: (Each undeclared ............ is reported only once Test_Stuff.c:58: error: for each function ............ appears in.) Test_Stuff.c:90: error: expected declaration or statement at end of input 13. it ............ i still get this error: gcc plug-in: Error: Object file not found on expected location C:\Users\ ............ \Test_Stuff\Test_Stuff.elf Make sure your makefile specifies the output .elf file as Test_Stuff.elf ............ after i renamed the makefile for Test_Stuff.......... 15. I ignore that ............ I redo steps #7 and 8 then hit the little avr button to program the device. this time i actually find ............ Test_Stuff.hex file I load it up and download it to my $50 bot. 16. ............ works!!!!! ...but theres only one problem...it runs forever...what I'm aiming ............ which will move the servos for lets say 5 seconds in one direction, stop, then move in the ............ direction for 3 sec. then moth move in different directions ......