looking for a developer to make a extension that will detect when the phone
comes to a complete stop no matter the orientation and report quickly .
Welcome back to odular,ā¦
Are you looking for any paid extension developer? If not then may you not be helpedā¦
Why not to learn develope extension yourself?.. As offcourse we are here to learnā¦
- Technical_zone
yes i dont care who it is .
did you already try the accelerometer sensor together with some threshold?
for example in the AccelerationChanged event:
if abs(xAccel) < 0.1 AND abs(yAccel) < 0.1 AND abs(zAccel) < 0.1
then "phone came to a complete stop"
see also this similar example App Inventor Code Snippets | Pura Vida Apps
Taifun
Iām assuming this is java or something . I only know how to use kodular building blocks .
Thatās why I asked for someone to build a extension . I could not find a way to do it with the blocks that was fast and 100% accurate with rather low CPU usage .
from what i understand it wont work
the value keeps changing even if the phone is laying on a table .
i have tried this . and get nothing ā¦
you can see this in this sample
here is sample code
testaccel.aia (17.4 KB)
depending on how the phone is layed the numbers are greatly different .
which is why i was asking for someone to build a extension .
now i have tried using the gyroscope sensor . and it seem to be based off velocity
buts its way to sensitive and reacts with bell at the slightest pause ā¦
i only want it to make a alert when its stopped for more than 500ms
i see the gyroscope sensor has a timestamp feature but im not sure if this
could somehow be used to detect how long it remained stopped .
any help ?
You can use clock component. Set time interval to 500ms. If conditions are met set clock enabled to true when clock timer show alert
i cant seem to figure it out ā¦ all i do with the clock is overload my phone and cause it to lock up ā¦
heres hoping someone can make a extension ā¦ ill pay ā¦
No, this is called pseudo codeā¦
@dora_paz solution is almost correct, the only thing which is missing are the abs blocksā¦ a value can be positive or negative, therefore you have to check for the absolute value of the 3 accel parametersā¦
You can find the abs block in the Maths drawer
Taifun
I think itās good to use an accelerometer, but kodular doesnāt have a linear accelerometer, so you have to use an accelerometer that includes gravity, and this sensor generally doesnāt have a value of 0,0,0 when not moving. So, do you know calculus? The derivative of a constant is 0,Integrating 0 is still 0.I use these properties, Gravity could be excluded on the accelerometer. seeing once is better than
a hundred words. Hereās a seismometer I made. Take a look and use it in the form you want.
- List item
Welcome. Thank you for your contribution
It looks like you forgot to add your exampleā¦
Taifun