📜 ⬆️ ⬇️

SleepPy Patterns (for N900) - Do you sleep well at night, as it always seemed to you?

I consider the acquisition of the truly amazing Nokia n900 as the second most important event in my IT fate (the first was a complete transition to linux both at work and at home). And he continues to amaze me more and more.

About a month ago, I wrote for myself a small python script that monitored and recorded changes from the phone’s accelerometer. The results of such a record, to put it mildly, puzzled me and surprised me. Expecting to see 5-6 "coups on the other side" throughout the night, I could not think of hundreds of such rotations around my own axis. I didn’t really believe the script results until I installed an infrared light source (near-IR LEDs) and modified a simple webcam by pulling out an infrared light filter from it.


')


Here is an interesting video turned out. Then the question arises - what causes my constant twisting? Experiments with airing the room and measuring the temperature showed only that I sleep more calmly at a very low temperature, i.e. about 17C, with a very light blanket. Those. if I supercool myself, I sleep like a log. But this is fraught with unpleasant consequences. After my experiment with an open window all night and a temperature of the unfortunate 17C, I fell ill and lain with a cold for a whole week. I don't experiment with temperature anymore.

The next step is to replace the pillow and mattress. There are suspicions that both are too hard for me. On softer pillows, I slept better. But this feeling, not yet tested experiment.

Originally written script for the last three days acquired PyGTK muzzle and began to look like a regular GUI application for maemo. Mostly used hildon widgets.

image

image

image

SleepPy Patterns can be installed from the Fremantle Extras-devel repository or from the project page. For those who have N900 and who would like to experiment with their own sleep:

http://sleeppy.garage.maemo.org/

The application was put up for the competition , and even won. Gip-Gip-URA !!! Pruflink.

Thank you all for your attention.

PS: I probably missed the most important idea of ​​the entire program - the alarm goes off exactly when after a certain time you start to move. Those. if you have already slept the required number of hours, or you need to get up to a certain time within a specified period, the program will start the alarm just when the accelerometer detects movement greater than the threshold you have defined, namely your movement means that you are no longer in deep sleep phase, and that wake you up already. Believe me, this is better than waking up in a deep phase when your brain is not at all tuned to awakening.

Source: https://habr.com/ru/post/91240/


All Articles