Hello,
I have a working code to read data from BMI160 an IMU sensor. The data is sent over BLE. Is there any way I can display the int16 data as it is in android or windows PC. Please reply ASAP
Hello,
I have a working code to read data from BMI160 an IMU sensor. The data is sent over BLE. Is there any way I can display the int16 data as it is in android or windows PC. Please reply ASAP
And is there any other way i could convert the integer value into a string.
Maybe, try something like this.
sensor_string = "%d, %d, %d, %d" unsigned char string_to_send[25]; sprintf(string_to_send, sensor_string, x, y, z, sensor_time); ble_uart_nus_string_send(string_to_send, strlen(string_to_send);
would sprintf have any effect on cpu performance?
I think, the nrf52 cpu should be able to handle one sprintf statement.
Although there maybe a better way of doing it. Maybe someone else can help with that.
Is there any way I can display the int16 data as it is in android or windows PC
Of course, there are plenty of ways!
98% of what any Android or Windows PC does is "displaying data".
As far as displaying the data goes, it is entirely irrelevant where the data came from, or how it was transferred - it's all just data!
eg,
printf( "The data value is: %d\n", my_int_data );
neither knows nor cares where my_int_data came from, or what it means - it simply sends it to stdout in the standard manner:
http://www.cplusplus.com/reference/cstdio/printf/
Many libraries / frameworks are available if you want a graphical display of your data ...