Accelerometer Script

New to ignition and wanting to use the accelerometer feature to change to a different perspective view upon the phone being shook by the user. Can get values to be displayed using the example given from inductive automation, however im now stuck on trying to get it to change views when any of the readings are above 12/13. Would appreciate any pointers or ideas.

You are turning those x,y,z values into a string. They need to stay numeric.

2 Likes

You could "simplify“ using x^2 as well instead of x * x :person_shrugging:

1 Like

Yeah cool ill change that and see if it does anything :+1:

is just using the ['z'] value and seeing if its above 13 the right way to go about it?

I see a nesting issue. This:
image
Should be this:
image
...or perhaps just this:
image
I don't understand this line of code because it's just a list with a string and compared to an integer :
image
Perhaps it should be this?
image