I have application uses serial port to send data from odroid xu4 to Arduino pro mini, the data is packages of 10 bytes i use "Serial_Port.write(struct.pack('cBBBBBBBBB', "R", cmd[0], cmd[1], cmd[2], cmd[3], cmd[4], cmd[5], cmd[6], cmd[7], cmd[8]))" and the odroid send two packages every 20 millisecond (50Hz), on the arduino this is the code:
ARDUINO CODE:
#include <Wire.h>
char CMD[] = {' ',' ',' ',' ',' ',' ',' ',' ',' ',' '};
char hand;
void setup() {
Serial.begin(115200);
Serial.setTimeout(10);
Serial.println("Arduinno serial to I2C converter 115200");
}
void loop() {
if (Serial.available() == 10) {
Serial.readBytes(CMD, 10);
Serial.println(CMD);
}
}
i use two XBee PRO S2C to transmit the data from XU4 to the Arduino, i connect the XBee with XU4 using Tx Rx pins, port: '/dev/ttySAC0'.
when i run the programs the Arduino receives only the first two or three frames of data then it stops working until i press the reset button. can any one help me with this problem, it take me a lot of time searching for solution but no good results. also i tried to replace the Arduino with raspberry Pi B+ but same problem.