Hello,
I have bougth several boards from seeed: Xadow main board , multigaz sensor board and breakout board and the last storage board.
Anyway, my wish would be to transmit data (CH4, N2O…) coming from xadow to MEGA arduino with Rx, Tx , Gnd pins from the breackout board. I check speed (9600 it is ok) and unfortunately I do not manage to do that.
Is there a way to do that?
My code in the MEGA arduino is the following:
char str[4];
void setup() {
Serial.begin(115200);
Serial2.begin(9600);
}
void loop() {
int i=0;
if (Serial2.available()) {
delay(100); //allows all serial sent to be received together
while(Serial2.available() && i<4) {
str[i++] = Serial2.read();
}
str[i++]=’\0’;
}
if(i>0) {
Serial.println(str);
}
}
and in the xadow main board it is your code that you provided. I have configured 9600 bauds for serial communication.
Then can you tell if it is normal not to receive data. I connect Tx , Rx from the breakout board to Rx2, Tx2, and GND to MEGA arduino.
I hope you will be able to help me !
Thank you
Pascal.