Reply
Thread Tools
Posts: 51 | Thanked: 57 times | Joined on Feb 2010 @ Helsinki
#1
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.
 

The Following User Says Thank You to kinipyon For This Useful Post:
hopbeat's Avatar
Posts: 516 | Thanked: 643 times | Joined on Oct 2009 @ Denmark/Poland
#2
@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.
__________________
Hi! I'm a Maemo Greeter!
Witaj na talk.maemo.org!

Useful links for newcomers:
Użyteczne linki:
Nowi użyktownicy mówią cześć | New members say hello , Tu zaczynają nowi użytkownicy | New users start here, Podforum społeczności | Community subforum, Wiki dla początkujących | Beginners' wiki page, Maemo5 101, Często zadawane pytania | Frequently Asked Questions (FAQ), Google

Jeżeli mogę w czymś pomóc, pytaj!
If I can help with anything else, just ask!

Bored? Follow me
 
Posts: 3,664 | Thanked: 1,530 times | Joined on Sep 2009 @ Hamilton, New Zealand
#3
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
 
Posts: 51 | Thanked: 57 times | Joined on Feb 2010 @ Helsinki
#4
Originally Posted by hopbeat View Post
@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's Avatar
Posts: 188 | Thanked: 185 times | Joined on Dec 2009 @ Finland
#5
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".
__________________
My wiki: User:Tuminoid
cpumem-applet: home | packages - status: 0.0.3 in Extras

cell-modem-ui: home | packages - status: 0.5.1-1 in Extras
nowplayingd: home | packages - status: 0.1-2 in extras-devel
custom-pwkmenu: home - no packages yet.
 
F2thaK's Avatar
Posts: 4,365 | Thanked: 2,467 times | Joined on Jan 2010 @ Australia Mate
#6
 
hopbeat's Avatar
Posts: 516 | Thanked: 643 times | Joined on Oct 2009 @ Denmark/Poland
#7
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
__________________
Hi! I'm a Maemo Greeter!
Witaj na talk.maemo.org!

Useful links for newcomers:
Użyteczne linki:
Nowi użyktownicy mówią cześć | New members say hello , Tu zaczynają nowi użytkownicy | New users start here, Podforum społeczności | Community subforum, Wiki dla początkujących | Beginners' wiki page, Maemo5 101, Często zadawane pytania | Frequently Asked Questions (FAQ), Google

Jeżeli mogę w czymś pomóc, pytaj!
If I can help with anything else, just ask!

Bored? Follow me
 
Posts: 210 | Thanked: 62 times | Joined on Jan 2010 @ Helsinki, Finland
#8
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's Avatar
Posts: 188 | Thanked: 185 times | Joined on Dec 2009 @ Finland
#9
Originally Posted by Brank View Post
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.
__________________
My wiki: User:Tuminoid
cpumem-applet: home | packages - status: 0.0.3 in Extras

cell-modem-ui: home | packages - status: 0.5.1-1 in Extras
nowplayingd: home | packages - status: 0.1-2 in extras-devel
custom-pwkmenu: home - no packages yet.
 
Posts: 210 | Thanked: 62 times | Joined on Jan 2010 @ Helsinki, Finland
#10
True, but I'd rather shake it violently to make it stfu
 
Reply


 
Forum Jump


All times are GMT. The time now is 00:46.