I am trying to send message from slave(STM2) to my master(STM1).but it doesnot show anything on my serial terminal .just i want to send and receive data in
between master and slave

my master code:

```
#include "mbed.h"

I2C i2c(PB_9,PB_6);      
Serial pc(USBTX, USBRX); 

int main() {
    const int addr = 0xA0;
    int a,b;
    char buff[10]; const char data[]="message master"; 

    i2c.frequency(10000);

    while(1) { 
    /* i2c.start();                             
        a=i2c.read(addr, buff,10,1);
        wait(1);        
        pc.printf("Read %d", a);        
        i2c.stop();                
        pc.printf("MASTER READ: %s \n\r", buff);*/         
        i2c.start();        
        b=i2c.write( addr, data, strlen(data)+1);        
        wait(0.07);          
        i2c.stop();        
        pc.printf("Write %d\n\r", b);        
        for(int i = 0; i < 10; i++) buff[i] = 0;

        }
 }

```

My slave code:

```
#include "mbed.h"

I2C i2c(PB_9,PB_6);
Serial pc(USBTX, USBRX);   

int main() {    

    const char test[]= "message slave";
    char buf[10];
    int i, b;

    i2c.frequency(10000);
    slave.address(0x01);    

    while(1) {

        i = slave.receive();
        wait(0.75);

        switch (i) {

            case I2CSlave::ReadAddressed:

                slave.stop();
                b=slave.write(test, strlen(test) + 1); 
                wait(0.75);

                pc.printf("Return Slave %d", b);// only to check return value

                break;
            case I2CSlave::WriteGeneral:

                slave.stop();
                slave.read(buf, 10);
                wait(0.75);
                pc.printf("SLAVE Read G: %s\n\r", buf);
                break;
            case I2CSlave::WriteAddressed:

                slave.stop();
                slave.read(buf, 10);
                wait(0.75);
                pc.printf("SLAVE Read A: %s\n\r", buf);
                break;
        }
        for(int i = 0; i < 10; i++) buf[i] = 0;        

    }
}

```