i'm doing a pedometer app on app inventor and have learnt this code. for reference, this is the link https://groups.google.com/forum/#!category-topic/mitappinventortest/windows-xp/QlZJYCSPQI0
and these are the blocks
i was wondering if this code is able to work on the X and Z axis of the accelerometer? i have tried putting the other axis into the if statement but it made the whole program very sensitive and it only works on the Y axis. I hope i can get some ideas on how to solve this.
--
Here is a list of other Users attempting to use the accelerometer as a pedometer https://groups.google.com/forum/#!searchin/mitappinventortest/Pedometer . It appears that Users are unsuccessfully getting the accelermometer to work using any of the axes because of sensitivity issues. The shock of a step is either too soft to engage the simple hardware in most Android devices or it becomes overly sensitive. Using a Clock trigger is an interesting idea.
The way to get this working is certainly trial and error. Among the post there are several aia files that might show what other Users attempted and you might use those ideas in your Project It would seem that either the x or y axis could be used; however the z axis (which is in some ways a measurement of gravity) might work. I experimented with all three and found them either not sensitive enough or too sensitive
When/if you get this working Hakeem, please do post your results here. This would be a neat project. You are also welcome to post an aia file for others to test. I expect some of the issue would be that the accellerometer is various Android devices responds a bit differently so what might work with a tablet might not work with a phone or another model.
--
I have tried to not use the x y z axes of the accelerometer block but i have been trying to understand the use of the shaking block. It did produce an increment to any orientation of the phone by 1. Here are my blocks:
I still used the clock trigger and have set the accelerometer sensor's minimum interval to 240(it's a trial and error value) and the sensitivity to strong. The clock's timer interval is set at 0. So far, the app does produce an increment value. I hope you give me your feedback on this.
--
댓글 없음:
댓글 쓰기