Moderator: igrr
I got some news.. i changed the I2C receive routine from the UDP.sketch a little ...somehow now it works better.. it realy looks like it should look
look my video...
[youtube]
https://youtu.be/5QwCmsqNgH8
[/youtube]
void Request_Data_from_Slave()
{
int i = 0;
int index2 = 0;
Wire.requestFrom(I2Cadress, 32); // request 32 bytes from slave device adress (I2C LiOr)
while (Wire.available()){
char inChar = Wire.read();
if(inChar == '<'){
started = true;
index2 = 0;
inData[index2] = inChar;
index2++;
inData[index2] = '\0';
}
else if(inChar == '>'){
ended = true;
inData[index2] = inChar;
index2++;
inData[index2] = '\0';
}
else if(started ){
inData[index2] = inChar;
index2++;
inData[index2] = '\0';
}
if(started && ended) {
started = false;
ended = false;
//Serial.println("inData:");
Serial.println(inData);
}
} //ifend
}
and added a small delay(2) after UDP.sending
void Send_inData_to_WiFi()
{
Udp.beginPacket(ipMulti, 2390);
Udp.print(UDP_String); // Sends the char Array over WiFi which we got from I2C
Udp.endPacket();
delay(2);
}
The SoftwareSerial from the reciever Handles 500k Baudrate !?!?! and provides the Data to my small AVR Infinity Mirror