How to set up a command-based communication using I2C

See the examples coming with the Wire library: i2c_scanner.
It helps to run the examples in order to become familiar with a protocol or library.

Again see the example programs: slave_receiver. If it doesn't work for you then something may be wrong with your cables. Also check the result of write() and endTransmission() on the master for possible problems.