Author Topic: Axon port Output and Compiling hex file in Ubuntu  (Read 2197 times)

0 Members and 1 Guest are viewing this topic.

Offline taba93Topic starter

  • Jr. Member
  • **
  • Posts: 15
  • Helpful? 0
Axon port Output and Compiling hex file in Ubuntu
« on: November 19, 2009, 09:25:29 AM »
Hi,
I have 2 problems. First: I want to output from 0 to 5 volts from a port of the axon microcontroller to make the sabertooth 2x10 motorcontroller work and  I don't know how to do it.
Second: I want to compile c files in hex files to upload them on the axon. First of all is it necessary to compile hex files and then upload them to the axon or can I upload directly the C file (in Ubuntu)?
Thank you, byebye  ;)

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots
Re: Axon port Output and Compiling hex file in Ubuntu
« Reply #1 on: November 21, 2009, 11:15:24 AM »
Instructions on using the Axon with Ubuntu:
http://www.societyofrobots.com/robotforum/index.php?topic=8216.0

Quote
I want to output from 0 to 5 volts from a port of the axon microcontroller to make the sabertooth 2x10 motorcontroller work

What do you have working so far?

Did you see the examples or source code pages? :P

Offline taba93Topic starter

  • Jr. Member
  • **
  • Posts: 15
  • Helpful? 0
Re: Axon port Output and Compiling hex file in Ubuntu
« Reply #2 on: November 22, 2009, 10:15:11 AM »
1. The instructions for Axon on Ubuntu I read it already...but my question was to make a hex file from a c file but in the meantime I solved this problem.
2. Yes I saw the examples...but which must I use? PWM is okay?

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots
Re: Axon port Output and Compiling hex file in Ubuntu
« Reply #3 on: November 22, 2009, 01:03:59 PM »
You can control a Sabertooth using 3 different ways:

PWM
servo control (use it like a normal servo)
UART

Use the Sabertooth website to tell you what switches to use on it.

Offline taba93Topic starter

  • Jr. Member
  • **
  • Posts: 15
  • Helpful? 0
Re: Axon port Output and Compiling hex file in Ubuntu
« Reply #4 on: December 01, 2009, 08:46:49 AM »
Another thing, I'm compiling the pwm.c file in the Axon Source Code directory but when i compile I get a lot of errors like this:

pwm.c:478: multiple definition of `PWM_timer4_Set_H5'
pwm.o:pwm.c:478: first defined here




Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots
Re: Axon port Output and Compiling hex file in Ubuntu
« Reply #5 on: December 01, 2009, 09:01:56 PM »
Are you sure you are running the latest Axon code version?

Offline taba93Topic starter

  • Jr. Member
  • **
  • Posts: 15
  • Helpful? 0
Re: Axon port Output and Compiling hex file in Ubuntu
« Reply #6 on: December 02, 2009, 06:59:39 AM »
Yesterday I have understand this problem. The fact is that I compile it under Ubuntu and he has some difficulties to find the libraries (probably he tries to find the libraries with the link of the Windows directory and he doesn't find them). If somebody knows how to solve that, please write it here. I try to compile it under Windows and it works!
But if I compile a file and upload it to the axon from Windows, and then I send commands to the axon from Ubuntu from USB (and the Axon receives them with the following code):

char temp;
temp=uart1GetByte();//returns -1 if no data present
if (temp == r)//if data received
   do_stuff();

can this thing work?
Thank you. Byebye


Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots
Re: Axon port Output and Compiling hex file in Ubuntu
« Reply #7 on: December 02, 2009, 08:26:45 AM »
Quote
But if I compile a file and upload it to the axon from Windows, and then I send commands to the axon from Ubuntu from USB (and the Axon receives them with the following code):
Yeap, the Axon USB doesn't care where the serial data comes from, so it'll work fine.

Offline taba93Topic starter

  • Jr. Member
  • **
  • Posts: 15
  • Helpful? 0
Re: Axon port Output and Compiling hex file in Ubuntu
« Reply #8 on: December 02, 2009, 09:56:35 AM »
thank you! ;)

 


Get Your Ad Here