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) {
initHardware();
}
// 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)
{
act_setSpeed(&cdi,din);
}
uartSendByte(serial2,'A');
return 75000;
}
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.