Society of Robots - Robot Forum
Software => Software => Topic started by: taba93 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 ;)
-
Instructions on using the Axon with Ubuntu:
http://www.societyofrobots.com/robotforum/index.php?topic=8216.0 (http://www.societyofrobots.com/robotforum/index.php?topic=8216.0)
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
-
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?
-
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.
-
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
-
Are you sure you are running the latest Axon code version?
-
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
-
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.
-
thank you! ;)