src/main.cpp
// function that executes whenever data is received from master
// this function is registered as an event, see setup()

function that executes whenever data is received from master
this function is registered as an event, see setup()
function that executes whenever data is received from master this function is registered as an event see setup ()
void receiveEvent(int howMany) {
  t=0;
  while (1 < Wire.available()) { 
    t++;
    Serial.println("loop");
    adresse = Wire.read(); 
    dat=1;
  }
  byte x = Wire.read();    
  last_byte = x;
  if (t==1){
    dat=0;
    daten_syncron = false;
    BID_aktiv[adresse]=last_byte;
  }
}
void receiveEvent ( int howMany ) { t = 0 ; while ( 1 < Wire . available ( ) ) { t ++ ; Serial . println ( " " ) ; adresse = Wire . read ( ) ; dat = 1 ; } byte x = Wire . read ( ) ; last_byte = x ; if ( t == 1 ) { dat = 0 ; daten_syncron = false ; BID_aktiv [ adresse ] = last_byte ; } }
function that executes whenever data is received from master
this function is registered as an event, see setup()
function that executes whenever data is received from master this function is registered as an event see setup ()
//Serial.print("EE");
 // loop through all but the last
 // receive byte as a character       // print the character
 //Serial.println(adresse); 
 // receive byte as an integer
 ///Serial.println("last_byte");
 //Serial.println(last_byte);         // print the integer
 //DEBUG EEPROM Schreiben    
 //Serial.print("write to ");
 //Serial.print(adresse);
 //Serial.print("  ");
 //Serial.println(last_byte);
