Hacker News new | ask | show | jobs
by fudged71 683 days ago
I just realized that I don't have XCode installed, and I'm hesitant to due to storage etc.

Would something like the following be feasible even though accelerometer isn't listed as one of the native capabilities?

``` Build an app that uses the accelerometer to measure the g-forces experienced while driving, and uses an audio tone with varying volume to indicate the magnitude of g-forces.

Show a large circle on the screen with a single black dot to represent the current g-forces for X and Y. Show a vertical rectangle on the side with a single blue dot to represent the current g-forces in the Z direction.

Using a single audio tone, vary the volume of this tone to represent the sum of X, Y, and Z g-force readings. At standstill the audio should be silent. ```

I have wanted something like this for a long time for driving to get a better sense of whatever cargo or passengers might be experiencing.

1 comments

Spawn apps can use the accelerometer - thanks for pointing this out, I'll clarify the website.

I pasted your prompt and got this: https://imgur.com/a/3Wg8AuK

During the recording, I moved around around and stopped twice. The only thing not working is the audio volume changing based on the g-force readings. I'm digging into why that's not working.

That's fantastic, wow!