Software > Software

Axon2 Uart Help Please! An Unknown error


Hi, I'm really happy for being part of the SoR. Now let's talk about my problem.
Some days ago I bougth an Axon2 for working on my graduate project at the university. It's a robot that follows the person movements by the kinect sensor. The whole stuff in the kinect sensor is going ok! , but the point is that I have to move the servos (20) in the humanoid plataform with the axon2, the computer and the axon2 are comunicating by xbee's.   I can send the data from the computer (Visual c#) to the axon2 and everything works perfect, but the real problem here is that I can't send any data from the Axon2 to the computer, I mean I've tried "uartSendByte" , "rprintf" and I always get the same thing in the computer (63) that is the ASCII for "?" question mark. I will put the code and as you will see it's pretty simple but I'm stucked in that part because I need to send information from the gyro to the computer and so on, so I don't know what I'm doing wrong if it's really simple, I've tried with another pair of xbees, and the same, the baud rate is ok! because the Axon2 receives the data correctly, but the only thing that I get in the coputer is "?" and I don't know why. Please help me because I have a lot of things to do and I'm stucked. Sorry for my english I'm from South America Ecuador. Thank's a lot for your answers.

PD: I used Webbotlib2 and the project designer to make the configuration part


--- Code: ---#include "hardware.h"

// Initialise the hardware
void appInitHardware(void) {
// Initialise the software
TICK_COUNT appInitSoftware(TICK_COUNT loopStart){
return 0;
// This is the main loop
TICK_COUNT appControl(LOOP_COUNT loopCount, TICK_COUNT loopStart) {

int din = uartGetByte(serial2);
if (din!=-1)


return 75000;
--- End code ---

I'm using Uart2, cdi is the name of my servo, I put 75000 in return as it made my servo work better with less jittering, I'm working at 19200 baud rate.

Did this resolve your issue?

I need up to a week to get to posts some times :P


--- Quote from: Admin on October 26, 2012, 09:12:41 PM ---Did this resolve your issue?

I need up to a week to get to posts some times :P

--- End quote ---

I didn't know but I think you have hundreds of posts to solve I understand. My ungent was because it's for a graduate project. Thank's a lot and that post solved my problem. In case guys it was because of the poor xbee regulated board from sparkfun, you have just to short the diode in DIN and now everything works perfectly!!! Axon2 is a relly cool product but this experience made me learned a lot of things and now I made my own programs from ZERO and I think that's better than just copying :) .... I recommend you to learn a bit of avr gcc programming , it's really easy just read the datasheets of the processor. and make functions and so on!!!

Have you tried just testing the hardware - ie with no micro-controller code at all? eg have you done a hardware "loop back" test at each of your hardware integration points. If you are sending an 'A' and its coming out as a '?' then your hardware ain't working

As I introduced in the last post the problem was solved, thanks a lot Webbot and ADMIN.


[0] Message Index

Go to full version