Hi,
I have a CMUCam which works via Bluetooth. According to its response to the GV command, it is a CMUCam2 v1.00 c6. THe SJ command also works.
I am trying to use the Axon to pipe the output of the SJ (send JPEG) command to the PC via rprintf. However, all I get is
��u�ŭ�EҎ� ����
and then -1s (not shown).
The code I'm using is:
void cmucam_init(void) {
uart0SendByte('R');
uart0SendByte('S');
uart0SendByte('\n');
delay_ms(500); // wait 500 milliseconds
uart0SendByte('R');
uart0SendByte('M');
uart0SendByte(' ');
uart0SendByte('1');
uart0SendByte('\n');
delay_ms(500); // wait 500 milliseconds
rprintf("CMUcam Initialized\n"); // send out the message through USB
}
void cmucam_test(void){
uart0SendByte('s');
uart0SendByte('j');
uart0SendByte('\r');
int c;
int i;
for (i = 0; i < 10000; i++){
c = uart0GetByte();
if (c != -1){
rprintf("%c", (char)c);
}
}
rprintf("\n\nOK");
/*Receive_Echo(6000);*/
}
................ In main() ..................
cmucam_init();
cmucam_test();
................ In Axon.c .................
uartSetBaudRate(0, 115200); // set UARTE speed, for the CMUCam
What's going on? I don't think it's an issue with UART bit errors, because I get so little data.
Any help would be greatly appreciated. Thank you so much!