This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2540 Accelerometer

Other Parts Discussed in Thread: CC2540

Hello...

Can anyone please guide me how to use the accelerometer in the keyfob with BTOOL in order to find the X,Y and Z directions??

I need to determine the direction when I am moving my keyfob. 

I have referred to CC2540 mini DK user's guide as well as to the link http://e2e.ti.com/blogs_/b/connecting_wirelessly/archive/2011/03/30/bluetooth-low-energy-training-at-all-hands-meeting.aspx

But I was not able to find the direction, Please guide me..

Thanks..

  • Hi Gautham,

    If you have looked in the CC2541DK-MINI Users Guide, you should have observed section 4.6 which clearly presents how to enable the accelerometer and which UUIDs/handles to enable notifications for (look at figure 27).

    Anyway, the procedure would be (applies on unmodified BLEv1.3 version of keyfobdemo):

    1. Write 01:00 to handle 0x0034 (Enable Accelerometer)
    2. Write 01:00 to handle 0x003B (Enable Notification for X)
    3. Write 01:00 to handle 0x003F (Enable Notification for Y)
    4. Write 01:00 to handle 0x0043 (Enable Notification for Z)
    Now move keyfob to get notifications by all coordinate directions.
    Best Regards
  • Thanks a lot...

    This worked fine... But can i determine X,Y and Z coordinate values at the same time by giving all the characteristic values...?? 

  • Hi,

    You can determine the coordinate based on the handle with the incoming notification. You could of course modify the application to sent X,Y,Z in one packet, but you would have to do this modification yourself.

    Best Regards