i have to advertise Lis3dh data. I have accelerometer and nrf52840 dk. Pls assist how can i advertise the data of lis3dh xyz values
i have to advertise Lis3dh data. I have accelerometer and nrf52840 dk. Pls assist how can i advertise the data of lis3dh xyz values
Hi,
I would suggest you take a look at Beacon Transmitter Sample Application or Direction finding connectionless beacon on how to advertise with data, and search for similar use cases on Davzone.
-Amanda H.
hi,
i know about the Beacon example and know about the advertising. But now i want to advertise the data of lis3dh accelerometer. pls assist me with some code that i can implement
actually i have interfaced the accelerometer and am able to get data over ble via TWI. but this data is in connectable mode. But i want to display the xyz values in advertising mode for which i need your assistance
You should refer to Beacon Transmitter Sample Application or Direction finding connectionless beacon to modify your project.
-Amanda H.
can u refer some example kindly where lis3dh data is advertised. I need some assistance for reference as i am new to it
gentle reminder
can you pls help
can you pls help
Please study tutorials:
Bluetooth low energy Advertising, a beginner's tutorial
Bluetooth Smart and the Nordic's Softdevices - Part 1 GAP Advertising
And refer to the examples to modify.
-Amanda H.
I am able to set the manufacturer data with values of lis3dh in advertising mode. I am abel to get values 
0x00010A this is the lis3dh data but i want that these acceleration values should be displayed in floating format
hello, am able to receive the data values in manufacturing packet. But i am only able to get x axis data kindly assist how to parse the values:
i have float LIS3DH_Acc[3];
these are the values i receive:
uint8_t tmp[6] = {0};
int16_t tmp_int16[3] = {0};
uint8_t status = 0;
//check data ready?
i2c_read(LIS3DH_I2C_ADDRESS ,(LIS3DH_REGISTER_STATUS_REG2), &status, 0x01);
if(status & LIS3DH_STATUS_REG_ZYXDA)
{
i2c_read(LIS3DH_I2C_ADDRESS ,(LIS3DH_REGISTER_OUT_X_L | LIS3DH_READ_MULTI_BYTES), tmp, 0x06);
tmp_int16[0] = (int16_t)((tmp[1]<< 8) | tmp[0]);
tmp_int16[1] = (int16_t)((tmp[3]<< 8) | tmp[2]);
tmp_int16[2] = (int16_t)((tmp[5]<< 8) | tmp[4]);
LIS3DH_Acc[0] = (float)(tmp_int16[0]) * LIS3DH_ACC_CONVERT_8G;
LIS3DH_Acc[1] = (float)(tmp_int16[1]) * LIS3DH_ACC_CONVERT_8G;
LIS3DH_Acc[2] = (float)(tmp_int16[2]) * LIS3DH_ACC_CONVERT_8G;
now, i have to put these values in data field of advertising packet manufacturer data
manuf_data.company_identifier = 0xFFFF;
manuf_data.data.p_data = data;
manuf_data.data.size = sizeof(data);
in this i want to put the data of LIS3DH_ACC how to put LIS3DH_Acc[0],LIS3DH_Acc[1],LIS3DH_Acc[2] values in data field??
Have a look at this case.
-Amanda H.
Hello,
thanku for assistance
i am able to receive the data of lis3dh in manufacturer data field. My issue is that i am receiving data in HEX format values. I want to view it in form of float. how to view?