go away spammer

Author Topic: programming in AVR studio  (Read 12162 times)

0 Members and 1 Guest are viewing this topic.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: programming in AVR studio
« Reply #30 on: February 19, 2010, 01:09:07 AM »
You really should follow the instructions, word for word, try the photovore demo, then modify from there.

All the errors you are getting are because you strayed from the instructions. ;)

Start off with something that works, then make small modifications and finally compile. Its easy to debug small modifications, but not a large program all at once. Compile often as you write your code, to keep debugging manageable.

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: programming in AVR studio
« Reply #31 on: February 19, 2010, 08:28:42 AM »
Ok I have attached: Omnibot.zip to unzip into your c:\Robo_stuff\ODEE folder
This file contains
Omnibot.c     (your program)
Omnibot.aps (the AVR Studio file)

So all you need to do is open the project in AVRStudio and click on the build button
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline Asellith

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 648
  • Helpful? 9
  • "I'm a leaf on the wind. Watch how I soar"
    • CorSec Engineering
Re: programming in AVR studio
« Reply #32 on: February 19, 2010, 10:41:51 AM »
Webbot something I was going to do for myself but might be a good addition to your library would be a startup template project that works. I usually end up copy and pasting parts of the photovore code anyway. If you could make a AVR-studio project file with proper folder structure that would be included with the library zip that might be very handy. not sure if AVR-studio will work nice with having possibly different path names and stuff however.
Jonathan Bowen
CorSec Engineering
www.corseceng.com

Offline dellagdTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 731
  • Helpful? 5
  • Come to the dark side... We have cookies!
    • Exodus Rocketry
Re: programming in AVR studio
« Reply #33 on: February 19, 2010, 12:07:04 PM »
Quote
Webbot something I was going to do for myself but might be a good addition to your library would be a startup template project that works.

that would be helpful  :)

and I will download your code when I get home from school
thx a bunch  ;D
I see what you did, with the PINGsonar.distance.cm. I guess I didn't understand the "the value can then be found in sensor.distance.cm" in the documentation on Webbotlib.
I now understand what it means.
« Last Edit: February 19, 2010, 12:22:40 PM by dellagd »
Innovation is a product of Failure, which leads to Success.

If I helped, +1 helpful pls

I Won!
3rd place! I'm taking $100

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: programming in AVR studio
« Reply #34 on: February 19, 2010, 01:01:03 PM »
Webbot something I was going to do for myself but might be a good addition to your library would be a startup template project that works. I usually end up copy and pasting parts of the photovore code anyway. If you could make a AVR-studio project file with proper folder structure that would be included with the library zip that might be very handy. not sure if AVR-studio will work nice with having possibly different path names and stuff however.

Thanks Asellith.

Answers/comments:-

  • If you use my Project Designer then it creates an 'example.txt' file which is actually a complete working program with all the appInitHardware/Software/Control functions in it and includes code to initialise all of your hardware as well as a main loop that shows you how to use the devices you've added.
    It doesn't splat over the top of your C file as you may have added some of your own code (ie your main program code). So you can regenerate it at any time. But if you are starting a new project then just rename it to 'MyProject.c' or whatever you want. Ths is the preferred solution.
  • I could add an empty 'MyProject.c' to the library but you would then still have to do a file copy/paste/rename to copy it into your project folder. The other alternative is to add it to the manual and then you just copy and paste from the manual.
  • Some IDEs allow you to create your own templates (Eclipse does, but AVRStudio doesn't). So you can set up the template once and call it a 'WebbotLib main' file. You can then just do a File|New and say you want a 'WebbotLib main'

If you've not yet used Project Designer then I suggest you take a look (find it at http://webbot.org.uk).  I may also looking at the code generation process so that if there isn't an AVRStudio project file then it creates one (setting up all the default stuff like include folders, libraries, processor and speed). That would be cool - but then may give headaches for supporting different/future versions of AVRStudio. The only thing I would need to think about is that Project Designer doesn't actually know where you have chosen to store the WebbotLib code which it would need to know in order to set up the include/library folders.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline dellagdTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 731
  • Helpful? 5
  • Come to the dark side... We have cookies!
    • Exodus Rocketry
Re: programming in AVR studio
« Reply #35 on: February 19, 2010, 02:46:18 PM »
Yes! Yes! Yes!
It compiled (not that I doubted it would  :D ) and now I have the hex file!
thanks to everyone who helped me on this, and especially webbot.
Yeah!
Innovation is a product of Failure, which leads to Success.

If I helped, +1 helpful pls

I Won!
3rd place! I'm taking $100

 


Get Your Ad Here

data_list