I've written a Arduino101 Bluetooth keyboard library, but it has a problem

Okey,I've solved this problem, and I added a delay(50) to slow it down.
I think setValue is too fast,but data transmission is not so fast.