Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That's cool. What principles is it based on and was it difficult to clean up the signals to get a reliable input?


I did not write the production code but I imagine they are tracking the velocity and acceleration vectors using a kalman filter and lighting up the lights when acceleration is negative in the direction of travel. By tracking the velocity vector in addition to acceleration one can eliminate the effects or the driver turning their head. I.e you are not just looking for a specific accelerometer axis to go negative, you have to use a more complex filter to determine the actual physical direction of travel of the device even as it rotates, and check for negative acceleration in that direction. To learn more:

https://github.com/adafruit/Adafruit_AHRS

https://learn.adafruit.com/how-to-fuse-motion-sensor-data-in...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: