usin a arduino clone mega 2560 as slave on a arduinon pro mini (leonardo)

Hy every one;

i hope i can find help here for one of my project;

I have an arduino leonardo whit usb and a mega (clone)

i use the leonardo as a push button but i have limited button;

i try the pcf8574 module but didnt find th way to make it run properly; (it can be defect);

i also have an clone arduino mega 2560;

i d like to use the large amount of digital input (input pullup) of the mega 2560 and usi it on the leonardo that have the keyboard feature;

does anyone ever do it;

can it run?

add more digital IO pins https://forum.arduino.cc/index.php?topic=173357.0

ieee488:
add more digital IO pins https://forum.arduino.cc/index.php?topic=173357.0

have already read ıt,

my main question is can a leopardo be master of a mega?

You can use Serial1/2/3 (in theory also Serial, but yhat will eliminate your debugging options) on the Mega to communicate with Serial1 on the Leonardo.

Master/slave depends on your implementation.

Leonardo can poll Mega or Mega can just send data when inputs change.

thanks ill will work on it