» Navigation Menu |
|
» Join our Chatroom! |

|
» Introduction Tutorials |

|
» Robot Parts! |
|
» Find Us on Facebook! |
|
|
» Arbotix |
|
» RoboGames |
|
» ComBots |
|
» Turrets! |
|
» Bioloid Premium Kit |
|
» Online Users: 330 |
| 16 members and 314 guests |
| blobbington, BMW1028, elaughlin, HyperMouse, innerbreed, italian_guy299, Jennero, kanda, lnxfergy, Rick Brooks, Robonaut, SteamAutomaton, Stobs, TOhm, Tyberius, Upgrayd |
| Most users ever online was 1,301, 09-11-2009 at 05:59 PM. |
» Stats |
Members: 4,281
Threads: 2,902
Posts: 37,199
Top Poster: Adrenalynn (5,316)
|
| Welcome to our newest member, elitetech |
|
 |
|

07-04-2009
|
 |
Quantum Gate
|
|
Join Date: Mar 2009
Posts: 94
Rep Power: 11
|
|
|
Re: Axon Programming Questions
haha, thats the trouble, I cant find it in any header :P-- which of course would be exactly why its not recongized by the compiler. If only I knew the header I could include it :/
|

07-04-2009
|
 |
Banned from posting too much :-)
|
|
Join Date: Apr 2008
Location: Sacramento, CA, USA Area
Posts: 5,316
Rep Power: 147
|
|
|
Re: Axon Programming Questions
|

07-05-2009
|
 |
Fergalicious!
|
|
Join Date: May 2008
Posts: 1,297
Rep Power: 61
|
|
|
Re: Axon Programming Questions
timer640.h
Right out of the documentation on Society of Robots: http://www.societyofrobots.com/axon/...t.shtml#delays
Quote:
There are two ways to create a time delay, or a pause, in your code. The first way offers the maximum time resolution possible. This method should be used if you do not require exact timing, but works well enough for servos and general wait commands:
delay_cycles(65500);
The second method involves using a timer interrupt on timer0. Typically this is the 'correct' wait for doing a delay, but could potentially cause conflicts if you are using other timer interrupts or have other time-sensitive algorithms running simultaneously.
delay_us(1000);//delay for 1000us
delay_ms(1000);//delay for 1000ms
delay_cycles uses a long int, so you can't delay more than 2^16 = 65536 (for 0 to 65535). Just do something like this to delay longer:
delay_cycles(65500);
delay_cycles(65500);
delay_cycles(65500);
Refer to timer640.h for more documentation on the timer. Note that the compiler will ignore delay_cycles if you turn on compiler optimization.
|
|

07-05-2009
|
 |
Quantum Gate
|
|
Join Date: Mar 2009
Posts: 94
Rep Power: 11
|
|
|
Re: Axon Programming Questions
Thanks for all the advice; timer640.h indeed includes the timer_inits however it is already #included in the SOR_UTILS and should therefore be defined. I treid including it a second time in my control.c but the functions remain unrecognized.
|

07-05-2009
|
 |
Fergalicious!
|
|
Join Date: May 2008
Posts: 1,297
Rep Power: 61
|
|
|
Re: Axon Programming Questions
Quote:
Originally Posted by WGhost9
Thanks for all the advice; timer640.h indeed includes the timer_inits however it is already #included in the SOR_UTILS and should therefore be defined. I treid including it a second time in my control.c but the functions remain unrecognized.
|
is the code possibly wrapped in a #ifdef? Might you be missing a definition related to which processor? Are you sure you have a good makefile (where said definitions would typically be)?
-Fergs
|

07-05-2009
|
 |
Quantum Gate
|
|
Join Date: Mar 2009
Posts: 94
Rep Power: 11
|
|
|
Re: Axon Programming Questions
Aha-ha! I have found the problem; the version of the timer reset and timer inits in Timer640.h have a '_' removed and added respectively changing their names slightly. Correcting their names in the ps2 code causes them to be recognized succesfully. However, this version of timer_init is no longer a void input but requires an input (defined as uint8 prescalar). I am working on what this input should be, but any suggestions are welcome  . Thanks for the continued support.
|

07-05-2009
|
 |
Quantum Gate
|
|
Join Date: Mar 2009
Posts: 94
Rep Power: 11
|
|
|
Re: Axon Programming Questions
Update 2: Getting the timer functions to be recognized does not prevent the Axon from crashing on the line
delay_ms(1);
|

07-06-2009
|
 |
Quantum Gate
|
|
Join Date: Mar 2009
Posts: 94
Rep Power: 11
|
|
|
Math.h for the Axon?
Well today I go to write some inverse kinematics for my Axon controlled project only to find it lacks basic math functions like square root and inverse sine etc. Currently I am messing around with trying to import math.h from the c library of Microsoft studio but it is proving annoyingly problematic. Rather than reinvent the wheel, I was wondering i anyone here has already written a math.h for the axon and would be so kind as to share it. Thanks very much,
WGhost9
|

07-06-2009
|
 |
Fergalicious!
|
|
Join Date: May 2008
Posts: 1,297
Rep Power: 61
|
|
|
Re: Math.h for the Axon?
Quote:
Originally Posted by WGhost9
Well today I go to write some inverse kinematics for my Axon controlled project only to find it lacks basic math functions like square root and inverse sine etc. Currently I am messing around with trying to import math.h from the c library of Microsoft studio but it is proving annoyingly problematic. Rather than reinvent the wheel, I was wondering i anyone here has already written a math.h for the axon and would be so kind as to share it. Thanks very much,
WGhost9
|
You probably want the math library from AVR-Libc
http://www.nongnu.org/avr-libc/user-...avr__math.html
-Fergs
Last edited by lnxfergy; 07-06-2009 at 01:51 PM.
|

07-06-2009
|
 |
Banned from posting too much :-)
|
|
Join Date: Apr 2008
Location: Sacramento, CA, USA Area
Posts: 5,316
Rep Power: 147
|
|
|
Re: Axon Programming Questions
Quote:
Originally Posted by Adrenalynn
[Moderator Note: Threads merged. They didn't really need to stand alone. Both were "Axon Programming Questions" as/per original. Thanks! -A]
|
[Moderator Note: Threads merged. They didn't really need to stand alone. Both were "Axon Programming Questions" by the same user, as/per original. Thanks! -A]
|
 |
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|