All Forums > Website Questions

Wire library (writer)arduino


my vertion in arduino 1.5.5.r2
what is wrong in code follow

#include <Wire.h>

void setup()
  Wire.begin(2);                 // join i2c bus with address #2
  Wire.onRequest(requestEvent);  // register event

void loop()

// function that executes whenever data is requested by master
// this function is registered as an event, see setup()
void requestEvent()
  Wire.write("hello ");  // respond with message of 6 bytes


[0] Message Index

Go to full version