From the last time, we improved the mechanism.
The improvements:
・To add an external battery for Arduino
・To add a switch to turn the Arduino on and off
・To activate the LED on the board as a visual feedback
・To add the calibration function and button
Because of some trouble, I changed the Arduino Nano to Arduino Micro.
I explain about how we calibrate for every user.
Logic flow:
1 | When the user pushes the calibration button first time, it registers the good posture value (angle). At that time the Arduino registered the X/Y/Z values from sensor as good posture value.
2 | When the user pushes the calibration button second time, it registers the bad posture value (angle). At that time the Arduino registered the X/Y/Z values from sensor as a bad posture value.
3 | After 1 and 2, it compares the absolute values of the difference between good posture value and bad posture value of X/Y/Z.
4 | It chooses one axis from X/Y/Z which has the biggest absolute value of the difference.
5 | If the absolute of the difference between the current angle of the chosen axis and good posture value is bigger than the absolute of the difference between the current angle of the chosen axis and bad posture value, it fire the filament and LED on the board and emit the smell.
Tomorrow we will try the user testing.
Shin