document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #include <TinyWireS.h> //You need this library to upload the sketch on your slave board
  2.  
  3. void setup()
  4. {
  5. TinyWireS.begin(8); //I2C communication
  6. TinyWireS.onRequest(test);
  7. }
  8.  
  9. void loop()
  10. {
  11. TinyWireS_stop_check();
  12. }
  13.  
  14. void test () //Master calls the slave and the latter one send data
  15. {
  16. TinyWireS.send(0);
  17. }
');