go_away

Author Topic: Need Help Programming Axon II  (Read 896 times)

0 Members and 1 Guest are viewing this topic.

Offline MastermimeTopic starter

  • Supreme Robot
  • *****
  • Posts: 314
  • Helpful? 5
Need Help Programming Axon II
« on: March 10, 2012, 12:15:27 AM »
Hello everyone,

I am in dire need of help.  Here is my predicament.

I expect to have my bot (mechanically and electrically) finished by the 18th and I have to finish and test the entire bot completely by the 22nd. This leaves me about 3 days to program.  I am under control of the electronics and mechanics, but I am a complete novice when it comes to programming.  I'm not sure where to start.  Here are my electronics and what I need the software to take care of (in parentheses):

Axon II
HS 65 servo (turn 180 degrees to rotate a camera)
(2) 10 watt leds (on/ off)
2 cooling fans (on/ off)
Xbee Pro XSC with the development board (transmit serial data back to my computer)
Sabertooth 2x25 (control two 400 watt motors using PWM)
2 temperature sensors http://www.sparkfun.com/products/9438 (output temperature on computer)

I need some direction.  Where do I start?  Would anyone happen to have any example code?

Thanks everyone.  I really appreciate the help




Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,632
  • Helpful? 169
    • Society of Robots
Re: Need Help Programming Axon II
« Reply #1 on: March 11, 2012, 09:22:20 AM »
A video is worth a thousand pictures ;D

How to Program Axon II in PD

Offline MastermimeTopic starter

  • Supreme Robot
  • *****
  • Posts: 314
  • Helpful? 5
Re: Need Help Programming Axon II
« Reply #2 on: March 11, 2012, 02:32:58 PM »
Ok how would I use things such as a battery monitor circuity (pretty much just a voltage divider that goes to the ADC signal pin) or a temperature sensor like this one? http://www.sparkfun.com/products/9438

Would I insert the code for the hardware that is not supported by the library in after I make the source file.  Also how do I configure baud rates?

Sorry for bombarding you with questions

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,632
  • Helpful? 169
    • Society of Robots
Re: Need Help Programming Axon II
« Reply #3 on: March 12, 2012, 03:48:59 AM »
Those sensors are analog based. Just drag n drop an ADC analog pin in, and the code will all be written for you.

Quote
Also how do I configure baud rates?
It's an option you set for the UART. Just double click the UART pin in PD and you'll see it.

Offline MastermimeTopic starter

  • Supreme Robot
  • *****
  • Posts: 314
  • Helpful? 5
Re: Need Help Programming Axon II
« Reply #4 on: March 13, 2012, 12:50:57 PM »
Quote
Those sensors are analog based. Just drag n drop an ADC analog pin in, and the code will all be written for you.
Ohhh I see. Thanks  :)

Quote
It's an option you set for the UART. Just double click the UART pin in PD and you'll see it.
Sorry I phrased that question poorly.  I meant "What are baud rates?" and how do I know which rate I should use?

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,632
  • Helpful? 169
    • Society of Robots
Re: Need Help Programming Axon II
« Reply #5 on: March 13, 2012, 09:26:29 PM »
You can use any baud rate you want (that's selectable).

Your only limit is both the mcu and the external device must having matching baud rates for them to communicate.

For most cases, the highest possible matching baud rate is the best.

Offline MastermimeTopic starter

  • Supreme Robot
  • *****
  • Posts: 314
  • Helpful? 5
Re: Need Help Programming Axon II
« Reply #6 on: March 14, 2012, 01:19:50 PM »
My external device would be my Xbee XSC, right?

I am having trouble finding what baud rates the XSC can run at.  You wouldn't happen to know, would you?  Or can it run at any rate?

Thanks for bearing with me. 

Edit:  Also I must be doing something wrong when trying to add the Sabertooth motor driver.  It's not giving me the OK button to add it.  What should I do?  Here is a photo
« Last Edit: March 14, 2012, 02:14:52 PM by Mastermime »

Offline MastermimeTopic starter

  • Supreme Robot
  • *****
  • Posts: 314
  • Helpful? 5
Re: Need Help Programming Axon II
« Reply #7 on: March 16, 2012, 08:00:40 PM »
I figured out the problem above, but I'm still a little unclear about baud rates.  Should all my baud rates be the same?  The maximum baud rate my Sabertooth has is 38400.  Do all my devices have to have this baud rate?
« Last Edit: March 16, 2012, 08:20:40 PM by Mastermime »

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,632
  • Helpful? 169
    • Society of Robots
Re: Need Help Programming Axon II
« Reply #8 on: March 17, 2012, 06:10:51 AM »
I figured out the problem above, but I'm still a little unclear about baud rates.  Should all my baud rates be the same?  The maximum baud rate my Sabertooth has is 38400.  Do all my devices have to have this baud rate?
Each UART on the Axon can have a different baud rate. Is that what you mean?

 


Get Your Ad Here