go_away

Author Topic: .hex file connection to iRobot Create  (Read 2627 times)

0 Members and 1 Guest are viewing this topic.

Offline jmoreno3Topic starter

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
.hex file connection to iRobot Create
« on: March 31, 2009, 04:50:28 PM »
I have my .hex file that I compiled and built using AVR Studio. But now how do I upload into the command module of the Create? Can someone please help me out with this because I need to do it soon. Thank you!!

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
Re: .hex file connection to iRobot Create
« Reply #1 on: March 31, 2009, 05:25:55 PM »
I beleive the create uses a PIC microcontroller...

Offline GearMotion

  • Supreme Robot
  • *****
  • Posts: 489
  • Helpful? 24
  • Two decades+ of Embedded Design
Re: .hex file connection to iRobot Create
« Reply #2 on: March 31, 2009, 07:13:23 PM »
iRobot CreateŽ Command Module Full Specifications

    * 8-bit 18MHz Atmel(r) ATmega 168 Microcontroller with 16Kbytes FLASH memory
    * Add custom hardware to expand Create's capabilities without tethering the robot to a PC.
    * Four Expansion Ports (ePorts) that allow you to add external electronics to the Command Module.
    * 2 analog only inputs
    * 4 digital only I/O pins
    * 6 digital I/O or analog input pins
    * USB connector for downloading code

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,666
  • Helpful? 169
    • Society of Robots
Re: .hex file connection to iRobot Create
« Reply #3 on: March 31, 2009, 10:30:36 PM »

Offline jmoreno3Topic starter

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
Re: .hex file connection to iRobot Create
« Reply #4 on: April 02, 2009, 02:35:13 PM »
Hey, thanks to everyone for the quick replys. Unfortunately I use the "avrdude -p atmega168 -P com9 -c stk500 -U flash:w:iRobot.hex" command on the window but i get the following error message:

avrdude: stk500_getsync(): not in sync: resp=0X00

I'm not sure why. And this is after I've downloaded everything (AVR software). And then I get a window saying avrdude needs to close. Are there any settings i need to change? Or files?

Please help. :o/

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,666
  • Helpful? 169
    • Society of Robots
Re: .hex file connection to iRobot Create
« Reply #5 on: April 02, 2009, 08:03:51 PM »
Did you search google for that error? ;)

Tons of solutions . . .

Here is just one of them:
http://www.ladyada.net/learn/arduino/help.html

Offline jmoreno3Topic starter

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
Re: .hex file connection to iRobot Create
« Reply #6 on: April 05, 2009, 09:04:20 PM »
i've tried a lot of the solutions unfortunately i'm getting lost and a lot of them dont seem to pertain to what i'm doing. is there an easier way of putting th hex file into the command module? can i use programmers notepad? (although I know you mention there are bugs with it so I'm not sure if it will work)

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,666
  • Helpful? 169
    • Society of Robots
Re: .hex file connection to iRobot Create
« Reply #7 on: April 05, 2009, 09:18:59 PM »
You have to use avrdude . . .

Are you sure you are using com 9? Are you sure you compiled the .hex file for ATmega168?

Tell us what debugging stuff you tried already.

Offline jmoreno3Topic starter

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
Re: .hex file connection to iRobot Create
« Reply #8 on: April 13, 2009, 06:47:58 PM »
well, i used the steps you listed in order to program the avr. i believe i am using com9 and i instead of the atmega8 that you list, i did the atmega168. (let me know if this is ok so far). then i tried adding the files and building the program. could it be possible i added the wrong files? because from the code that you provide there are a couple of .c file and to tell you the truth i wasnt really sure what files i should add. could you let me know? because i think i used the irobot.c, irobot.h, and makefile in there and it compiled. however, i'm know sure if i did this correctly, because i really am a beginner. but would this really still affect my avrdude from working after i already downloaded it?

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,666
  • Helpful? 169
    • Society of Robots
Re: .hex file connection to iRobot Create
« Reply #9 on: April 13, 2009, 11:21:57 PM »
Quote
i believe i am using com9

You don't sound so sure . . . did you check in System Devices? :P

Quote
then i tried adding the files and building the program. could it be possible i added the wrong files?

Uhhhh what files did you add?

Quote
because from the code that you provide there are a couple of .c file and to tell you the truth i wasnt really sure what files i should add. could you let me know?

Nothing wrong with having multiple .c files. The makefile defines which .c file is the main file.

Quote
however, i'm know sure if i did this correctly, because i really am a beginner.

Depends. Did you get an error when compiling?

Tell you what, try to upload just this file:
http://www.societyofrobots.com/robotforum/index.php?action=dlattach;topic=5932.0;attach=2153
That is a valid .hex file. Let us know what happens.

Offline jmoreno3Topic starter

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
Re: .hex file connection to iRobot Create
« Reply #10 on: April 20, 2009, 08:47:34 PM »
Hey! I'm glad to sat I got it to work!! I think the problem was that the filies weren't in the right folder. I was a little confused. Now I'm trying the wavefront algorithm. Which .c,.h files should I include in AVR studio? Because there are a couple of them. And do these files need to be in a the same iRobot project but taking out the old files I used for the stampy program? Or can I make a new project?

Thanks again for all the help!!

Offline jmoreno3Topic starter

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
Re: .hex file connection to iRobot Create
« Reply #11 on: April 21, 2009, 11:09:26 PM »
Hey I actually figured it out and answered my own questions. Now that I have the programs running (on two different Creates, one with the Stampy and one with the Wavefront code), i do notice a difference from what you have. For the stampy code, is the robot supposed to move and follow an object? Because all the sensor does at this point is just follow an object and when it does not see anything, it moves all the way to its right side. In order for me to get it to follow I need to place something in front of the sensor and then move it to the sides. As for the wavefront code, the robot does move but it doesnt do the 180 sensor turns before it moves on. Also it does seem to be a little slower than what you have on the video. I thought of two possibilities and maybe you can let me know if they could be it or not. One was that I may have the two signal wires crossed (not sure if this would affect much). Although I did try to switch them around and it just doesnt work when they are so I"m assuming that it isnt that. The other solution is maybe that there is not a good contact when i just insert the cables into the port. What i did was buy a serial cable to cut up and solder the cables and hopefully this will fix the problem. I will let you know what happens but if you could give me some feedback it would help. Thanks!

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,666
  • Helpful? 169
    • Society of Robots
Re: .hex file connection to iRobot Create
« Reply #12 on: May 30, 2009, 10:35:03 AM »
Quote
i do notice a difference from what you have. For the stampy code, is the robot supposed to move and follow an object? Because all the sensor does at this point is just follow an object and when it does not see anything, it moves all the way to its right side. In order for me to get it to follow I need to place something in front of the sensor and then move it to the sides.
Yea thats normal. The whole robot will just circle around (in search mode), until it reacquires the target.


Quote
As for the wavefront code, the robot does move but it doesnt do the 180 sensor turns before it moves on.
Hmmmm you mean it just drives straight? You sure the sensor is working and the range (and threshold setting) is correct?

Ever get it to work?

 


Get Your Ad Here