⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
4 posts / 0 new
Last post
channing
Offline
Last seen:2 years 11 months ago
加入:2019-02-24 13:22
da14583 data convert

Hi
I have a problem with da14583 iot sensor, I have received 14583 data but I don't know how to convert it to real data. i get data like this bytearray(b'\x02\x02\x03\xf9\xff\x00\x00\x02\x00')
i know the last 6 data are x y z sensor data so x=\xf9\xff y=x00\x00 z=x02\x00 What method can be used to convert to real data? it look like int16 ? thanks

Keywords:
Device:
PM_Dialog
Offline
Last seen:2 months 1 week ago
工作人员
加入:2018-02-08 11:03
Hi channing,

Hi channing,

Please check the UM-B-063https://support.dialog-semiconductor.com/system/files/restricted/UM-B-06...from our support portal. Regarding this document the gyroscope sensitivity specified in degree/s per full-scale value (range is -32768 to +32767). For example, if set to 2000 then a gyro value of 1 corresponds to a rate of rotation of 2000 / 32768 = 0.061 degree/s. The values are raw data from the sensor and should be divided with the current sensitivity in order to get the correct value Is this the information you need?

Thanks, PM_Dialog

channing
Offline
Last seen:2 years 11 months ago
加入:2019-02-24 13:22
Is the accelerometer and

Is the accelerometer and magnetometer also converted like this?

PM_Dialog
Offline
Last seen:2 months 1 week ago
工作人员
加入:2018-02-08 11:03
Hi channing,

Hi channing,

The values that you get are in hexadecimal little endian format, and also the application applies a header to the value send in order to tag the data that are send from the peripheral to the device . For more information, I would suggest you to check the UM-B-063 DA14583 IoT Sensor Development Kit document. So lets take an example. Suppose that you get from the accelerometer the (0x)01-02-03-1F-03-CA-FF-30-40, if you decode that you will get:

01 -> Report ID - What kind of data are in this specific packet, 0x01 indicates that these are accelerometer data (Table 9 on the document previously mentioned)

02 -> Sensor State - Always 0x02

03 -> Sensor Event - Always 0x03

1F-03 -> X axis value - That means that the actual value is 0x031F and the decimal value 799

CA-FF -> Y axis value - That means that actual value is 0xFFCA and the actual value is -54

30-40 -> Z axis value - That means that actual value is 0x4030 and the actual value is 16432

Thanks, PM_Dialog