when I'm trying to send data, and the other device also try to send data, it seems like the data is corrupted when I'm calling to receive method (if I send 'a', I got something like ' ˜ ' or something like this)
This is the scenario:
Arduino and Android communicate via bluetooth.
- Arduino wants to send data.
- Arduino has data to receive (still not pull them).
- Arduino send the data to android.
- Android get a corrupted data.
If in step 2 the receive buff was empty, the data that arduino sent would be send without any damaged.
There is a simple method that can solve this problem for me?