2 // by Nicholas Zambetti <http://www.zambetti.com>
4 // Demonstrates use of the Wire library
5 // Sends data as an I2C/TWI slave device
6 // Refer to the "Wire Master Reader" example for use with this
8 // Created 29 March 2006
14 Wire.begin(2); // join i2c bus with address #2
15 Wire.onRequest(requestEvent); // register event
23 // function that executes whenever data is requested by master
24 // this function is registered as an event, see setup()
27 Wire.send("hello "); // respond with message of 6 bytes
28 // as expected by master