LCD 16×2 have around 16 pins which needs to be connected to microcontroller in order to make it work. But by using an I2C extender, we only needs to connect 2 pins (SDA and SCL) to the microcontroller.
SPI is not very different from I2C. To enable a slave device, we need to pull the CS pin low and after our read or write is complete, just pull the pin high again. This will disable the slave device.
The writing procedure is same as mentioned in the beginning of the post i.e. START -> WRITE SLAVE ADDRESS -> WRITE REGISTER ADDRESS -> WRITE DATA -> STOP
Set the TAP THRESHOLD to 2.5g. To do that we need to write 40 (2.5/.0625) to the THRESH_TAP Register. This means that you need at least 2.5g acceleration in Z AXIS in order for the tap to qualify as TAP.