Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Buffalochill
#62671 Hey man thanks thats a good idea...

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 8-) 8-) :o :o :idea: :idea:

look my video...

[youtube]
https://youtu.be/5QwCmsqNgH8
[/youtube]


Code: Select allvoid 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
Code: Select allvoid 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 :shock: :idea: 8-)