Master/Slave communication

My master code:

Wire.begin(MY_ADD);
  1. Don't give the master an address. If you pass an address to Wire.begin() it puts it in slave mode.

  2. You still never assign any value to Address. How does the master know where to send the data?

In your text file, does "G90" identify the slave number to send this to? So read the incoming data looking for the first "G" and then put the "90" into Address.

And my slave code:

  1. Why do you attach the receive event handler 6 times in setup? That only needs to be done once.

  2. The slave never does anything with the received data? How woild you know if it worked? Just get it to send it to the PC on Serial, to start.