Now the task is simple, send an command from ESP EASY like this:
http://ip/control?cmd=pcfgpio,4,1
and catch an Wire.onReceive event on Arduino and get data
Code: Select all
#include <Wire.h>
void setup()
{
Wire.begin(4);
Wire.onReceive(receiveEvent);
Serial.begin(9600);
Serial.println("Start slave");
}
void loop()
{
......
}
void receiveEvent(int howMany)
{
Serial.print("EVENT!");
c = Wire.read();
....
}
i2c connect ESP 8285 (Master) -> Arduino (Slave) is working!