maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Shake to Wake (https://talk.maemo.org/showthread.php?t=46104)

kinipyon 2010-02-28 10:52

Shake to Wake
 
Hello,

I wrote a simple python script to wake up the N900 screen when shaking the phone.

Video here
Source code is available here

Please note that if you are running this script background, it takes 60% of CPU power all the time and drains your battery very quickly.

hopbeat 2010-02-28 11:01

Re: Shake to Wake
 
@kinipyon, if you are going for this kind of app, I would suggest using c with glib (using D-Bus does not wake cpu).
You may want to take a look at proximityd that provides d-bus service for proximity sensor state.

maxximuscool 2010-02-28 11:01

Re: Shake to Wake
 
great invention but bad idea :) our N900 barely last 24hours with average usage, include this script will destroy it completely.

I'm not keen to try though :) bet someone else might give it a crack. Thank for bringing new fresh idea. thank you

kinipyon 2010-02-28 11:05

Re: Shake to Wake
 
Quote:

Originally Posted by hopbeat (Post 549715)
@kinipyon, if you are going for this kind of app, I would suggest using c with glib (using D-Bus does not wake cpu).
You may want to take a look at proximityd that provides d-bus service for proximity sensor state.

Thanks hopbeat, I have been looking alternative ways to read acceleration values other than ugly file reading. This was nearly a Python exercise for me.. maybe I look into C also.

tuminoid 2010-02-28 11:13

Re: Shake to Wake
 
Having accelerometer on (even if not reading the values) will consume nice amount of battery, so I'd suggest not doing it, it'll destroy the battery even if you do it "correctly".

F2thaK 2010-02-28 11:15

Re: Shake to Wake
 
mmmmmm nice

hopbeat 2010-02-28 11:18

Re: Shake to Wake
 
Yes, shaking is not a kind of control that you would like to use constantly. But for actions such as turning off the alarm, rejecting phone call, opening sms etc. it may be suitable. So keep digging, @kinipyon :)

Brank 2010-02-28 21:14

Re: Shake to Wake
 
The alarm thing is a really cool idea. Like say it triggers the accelometer online only when the alarm starts ringing, so you pick it up and give it a shake and it will either snooze or go straight off. Could maybe be controlled by length of shake.

tuminoid 2010-02-28 22:36

Re: Shake to Wake
 
Quote:

Originally Posted by Brank (Post 550293)
The alarm thing is a really cool idea. Like say it triggers the accelometer online only when the alarm starts ringing, so you pick it up and give it a shake and it will either snooze or go straight off. Could maybe be controlled by length of shake.

Alarm already snoozes if you flip phone face-down, so gain is rather minimalistic.

Brank 2010-03-01 05:34

Re: Shake to Wake
 
True, but I'd rather shake it violently to make it stfu :)


All times are GMT. The time now is 05:01.

vBulletin® Version 3.8.8