This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Read data from nRF51 to MATLAB

Hi all, i'm continuing the exploration of the possibilities offered by BLE. I tried the example ble_app_uart on my nRF51 DK, sending for example the number "1" from my phone to the DK (in future i will send sensor data), which is connected via USB to my pc. On Matlab, i open the serial port COM3 where the board is connected, and i read it, receiving the data. The problem is that if i simply use "app_uart_put" function to send something written by me in the code (an int number for example), i can read it correctly on matlab, but with the data sent from the phone, received by the DK and the sent to the COM port via UART, i get strange result, like:

I send "5" from the phone ----> i receive 53 10 on Matlab; I send "6" from the phone ----> i receive 54 10 on Matlab; I send "7" from the phone ----> i receive 55 10 on Matlab;

So something is actually read correctly, but it looks like there is some coding problem or something similar, due to the transmission from the uart app on the phone, and the receiving nRF board (i guess).

How can i solve this and read correctly the data?

Parents Reply Children
No Data
Related