Serial pc(USBTX,USBRX); I2C i2c(p9,p10); void writing(int val) { i2c.start(); i2c.write(0b10100000); //address 1010xxxx, r/w=0 write i2c.write(0);