Welcome back to andidinata.com. I’d like to share an interesting application of coding in real-life. We tend to slump whenever we sit on the floor or chair where there is no back support. And that is what commonly observed to the young and grown-up. I saw this advertisement on Instagram about device that you could stick on the nape of your neck and visualize your posture in your smartphone. That idea is simple and i think we can make it our self in a weekend project.
I got some Circuit Python hardware back in February 2019, and i think Circuit Playground Express will do the job perfectly. What i need from this amazing little board on-boarder (sensor and actuator) is the accelerometer, neopixel, tactile switch and built-in speaker.
The code is stored in github page (www.github.com/mdinata/circuitpython), and here is the top line:
- Capture the z-Axis because we’d like to capture when the board tilt
- Create a function to set the threshold value of z-axis
- Create a function to control neopixel based on the threshold value
- Create a function to beep when reading is over threshold
Use a sticky double tape and place it at the nape of the neck. Here is the instagram post to see it how it in action.
Thanks for reading and hope you find this useful. Please support by subscribe, like and share. Till we meet again in the next article.