Waterme11on
Active member
Hey I was wondering if anyone could help me out with coding a motion detection setup with the audio library.
So i want to open and shut a filter or change a mixer gain depending on whether the accelerometer detects motion. Meaning if my prop shield is moving it lets sound out, but if it's still it stays silent.
I figured it would involve using the raw ax, ay, az values from the accelerometer instead of using roll, pitch or yaw.
I also want to be able to have the prop shield resting in any orientation, as it is mounted within a sphere, meaning I cant just do an "if ay=1, mixer gain = 0" type of operation.
Could anyone point me in the right direction for figuring this out? Or if you have any suggestions for an alternate method at achieving the 'no motion = no sound' effect.
Cheers.
So i want to open and shut a filter or change a mixer gain depending on whether the accelerometer detects motion. Meaning if my prop shield is moving it lets sound out, but if it's still it stays silent.
I figured it would involve using the raw ax, ay, az values from the accelerometer instead of using roll, pitch or yaw.
I also want to be able to have the prop shield resting in any orientation, as it is mounted within a sphere, meaning I cant just do an "if ay=1, mixer gain = 0" type of operation.
Could anyone point me in the right direction for figuring this out? Or if you have any suggestions for an alternate method at achieving the 'no motion = no sound' effect.
Cheers.