Discussion about Cancelling Alert message temporarily/permanently and about using sensors to detect sudden increase in speed after short term rest or less movement?

Help me to do this,

  1. If phone's position is in favor to accelerometer's x value then proceed with x value - To detect the speed change.

  2. If phone's position is in favor to accelerometer's y value then proceed with y value - To detect the speed change.

That is what I tried in above blocks as a newbie.

See the answers here

Taifun

I guess, the blocks that I shared recently is closer to the result. Please, look at it and give your ideas as well.

Update: Im getting result now as expected but with some errors, ie, the x and y values are getting stuck (not updating new values). This may be because of fault in clock arrangements or something else, have a look and guide me.

Accelerometer shows fixed value when we tilt the phone in different position. So, it is difficult to depend this sensor to check the speed/movement-spikes. Because, same x,y,z reading for phone tilt and phone movement. How can we differentiate the readings between phone tilt and phone movement? There is no option for that.

In case of orientation sensor, the readings will be shown only for phone tilt. But, in accelerometer sensor both values are confused and mixed/merged each other, we cannot differentiate the values as when the sensor shows reading for phone tilt and when it shows reading for phone movement. If there is a way to differentiate Phone Movement using accelerometer sensor, please share the idea here.

Is there a way to compare current accelerometer values with past accelerometer values?

Keep copies of the values somewhere.

1 Like

Is there predefined values for accelerometer sensor for different phone positions? Is there any table for that?

No predefined values since accelerometers are hardware based, ranges of measurement are determined by what hardware a manufacturer includes in a device.

Accelerometer Data Collection and Processing Criteria to Assess Physical Activity and Other Outcomes: A Systematic Review and Practical Considerations - PMC.

As a rule of thumb,

  • the x axis values are positive when the phone is tilted left
  • the x axis values are negative when the phone is tilted right
  • the y axis values are positive when the front of phone is tilted up
  • the y axis values are negative when the front of phone is tilted down

Why not experiment with your phone?

. What Google says:

1 Like

Yes, I am experimenting with my phone.

@SteveJG But, how can I create an app that differentiate tilt value and movement value using accelerometer, because accelerometer shows both value (ie, value for tilt and movement) without distinguishing both values. I wish to distinguish both.

That Google article was very informative a about this problem, especially when they talk about calibration and the use of high pass filtering.

Get out your math muscles

1 Like

Distinguish both. :wink:
shaking

For other methods to determine constant movement

1 Like

I think, by using the above blocks, we can detect when the phone is not shaking as well. Il try.

Can I predict if the values of accelerometer goes up or down from the current value? If the value goes up/down (+3 or -3 ) from the current value, then play music.

I tried these blocks, But, this is not working, guide me,

I do not believe that is possible

Sorry, all your Blocks in the if statements are wrong and meaningless.

1 Like

When I tried to compare the x, y and z to know if x is smaller, the blocks are not working,

Will it work if we make the x, y, z as global variables and then try to know which value is smaller? Il get time at night, will expeiment it at that time. Will try by including TinyDB as well.

This possibly will work for you.


accelerratorAlarm.aia (48.7 KB)

The simple acceleration example app recognizes Tilting up and down and left/right using the x and y accel. No need to use z axis and compare it to any other axis. Plays a sound when acceleration is within specific values.

Experiment with to make it perform as you want.

1 Like

Okay, may I know

When phone position is LEFT, which value (x or y or z) will raise during movement like forward and backward?