How to get accelerometer from data field

Hello, I'm trying to create a data field where I need to get accelerometer for edge 1000/1030. The goal is to read acceleration continuously so that I can do some calculation on compute method with components ax, ay, az. Maths are clear, but I am not able to success on getting acceleration.
I have tried to modify sample apps working with the accelerometer in the SDK to create the data field, but I do not know how to implement background process in this case.
Is there any specific sample for data fields that I could use to start.
  • Hi ... any progress on this? Interested as well!
  • Hey,

    I'm not sure how this post got buried, but some Edge Devices do not current support getting information from the acceleromter. The Edge 1000 has some hardware limitations that cause this and the some other devices have some software limitation, but might have the function included in the future. I know that doesn't give much to hold on to, but I have raised the issue with the device team about what it might take to integrate this feature.

    Thanks,
    - Coleman
  • Hi, but this is not device related problem, right? If I understand correctly, DataField App doesn't have access to Sensor module API at all, so there is no way to get accelerometer data in datafield on any devices, even on Fenix 5 which I am trying to work with. Sensor History module will not help there.

    I know I can make separate application with ability to read these datas, but I don't expect users to be interested in installing whole new app for common activity (lots of disadvantages) to get just one new metric which I had planned to bring by new datafield.
  • Yes. Data fields do have access to the Sensor module, but only in background processes. This implies that there are limitations to the frequency and duration of accelerometer access (background tasks only run for 30 seconds or so and once every 5 minutes at most).

    This is *not* clear when using the New Connect IQ Project wizard as the permission for the Sensor module is listed as selectable. If, after creating your project, you use the Manifest Editor (right-click the project in Eclipse, select Properties, click Connect IQ on the left, click Configure App on the right, then click the Permissions tab) you'll see that the Sensor module permission is only available if the Background permission is also selected.

    I've filed a JIRA to re-work the wizard so that this is more clear in the future.
  • Yep, it is confusing. Later I found out about this background proccess, but its not much of use when you want determine movements from accelerometer sensor from datafield. It would be great if datafield gets non-stop access to these data one day (without major impact on battery or other running processes ofcourse).
  • I'd concur that getting accelometer data every 5 minutes is indeed not useful.

    Maybe introduce a new permission so that the people downloading know that the data field will be able to access accelometer data at will with the mention that this might impact battery life.