locked
Drawing lines in canvas using accelerometer sensor data in windows phone 8.1 RRS feed

  • Question

  • I am drawing on canvas based on device movement, I want to draw different characters in canvas based on mobile movement.

    Currently its working butt i want to find time difference and i want to detect pause , pause means when user is not trying to draw and user is not moving mobile phone , so that Application ca assume that now user want to draw next character, How to find pause in accelerometer values. Any logic ? Also tell me how i can smooth accelerometer values , so that user can draw lines without noise.

    Wednesday, May 6, 2015 5:16 PM

All replies

  • How to find pause in accelerometer values. Any logic ?

    You asked those work which Motion class has done. The Motion class handles the low-level sensor calculation and allows applications to easily obtain the device’s attitude (yaw, pitch, and roll), rotational acceleration, and linear acceleration both due to gravity and user movement. If you cannot use this class in your app, maybe has no hardware in device, you shall use your favor search engine to find a logic to calculate the x,y,z provided by Accelerometer.
    Thursday, May 7, 2015 9:07 AM
  • Hi Hammad,

    Have two questions need to confirm:

    1, Are you working for Windows Phone 8.1 Silverlight or Runtime?

    2, How do you define the pause, means the user is not moving the device for 5 seconds? In general, if the accelerometer X, Y and Z value keeps same in some seconds, we can say it pause.

    --James


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, May 27, 2015 1:19 PM
    Moderator