Create a gist now

Instantly share code, notes, and snippets.

anonymous /gist:2732889
Created May 19, 2012

#include <Wire.h>
int pin;
int estado;
void setup()
{
Wire.begin(2);
Wire.onReceive(receiveEvent);
}
void loop()
{
}
void receiveEvent(int howMany)
{
pin = Wire.receive();
estado = Wire.receive();
digitalWrite(pin, estado);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment