Application to fade screen

Lynn Nguyen lynn.mesl at gmail.com
Sat Aug 16 16:53:10 CEST 2008


Wow this is great thanks aapo! I was actually thinking about just writing a
shell script to echo 0 into that file but I like this way alot better. Do
you think you could walk me through the python script? I'm not much of a
python guru and already I can't find out why open() has a third argument.
I'm only used to seeing two and searching open for 3 arguments comes up with
nothing. I don't get the purpose of writing numbers to the file? Do the
numbers control how much it fades? and what is 63 for? Where did you find
out about '/*
sys/devices/platform/s3c2440-i2c/i2c-adapter/i2c-0/0-0073/backlight/pcf50633-bl/brightness'
* ? Thanks again for all your help!

Lynn

On Thu, Aug 14, 2008 at 1:07 PM, Aapo Rantalainen <
aapo.rantalainen at gmail.com> wrote:

> 2008/8/14 Lynn Nguyen <lynn.mesl at gmail.com>:
> > I mean, is there some way to control it within in application? In like
> say
> > C, python, or java? Not on a shell?
>
>
> I think best way to tell something is use shell. This is some python
> application to fade screen black and light again. This is not screen
> saver, there is no input reading etc. This is only my way to say how
> shell -> python (or if you can write in file with java, then shell ->
> java)
>
> Should this be in wiki? And what is the right page?
>
>
> #!/usr/bin/python
> """Dims backlight (and lights its again)
>
> Usage: python dim.py
> """
> import sys
> import time
>
> def dim():
>    global brig
>    brig =
> open("/sys/devices/platform/s3c2440-i2c/i2c-adapter/i2c-0/0-0073/backlight/pcf50633-bl/brightness",
> "w", 1)
>    duration = 0.200
>
>    for i in range(7):
>       brig.write(str((6-i)*10) + "\n")
>       time.sleep(duration)
>
>    time.sleep(duration*5)
>
>    for i in range(7):
>       brig.write(str(i*10) + "\n")
>       time.sleep(duration)
>
>
>    brig.write(str(63) + "\n")
>    brig.close()
>
> if __name__ == "__main__":
>    dim()
>
>
> -Aapo Rantalainen
>
>
> > haha no.
> >
> >
> > Thanks!
> > Lynn
> >
> > On Wed, Aug 13, 2008 at 3:12 PM, Andy Green <andy at openmoko.com> wrote:
> >>
> >> -----BEGIN PGP SIGNED MESSAGE-----
> >> Hash: SHA1
> >>
> >> Somebody in the thread at some point said:
> >> | Andy Green wrote:
> >> |> Somebody in the thread at some point said:
> >> |> | Hello all--
> >> |> |
> >> |> | I was wondering, is there some sort of application that will let me
> >> |> | manually fade the openmoko screen to black? Similar to a screen
> >> saver?
> >> |> | Thanks!
> >> |>
> >> |> What are you, some kind of Goth?  :-)
> >> |>
> >> |> echo 0
> >> |>
> >>
> >>
> |/sys/devices/platform/s3c2440-i2c/i2c-adapter/i2c-0/0-0073/backlight/pcf50633-bl/brightness
> >> |>
> >> |> -Andy
> >> | Now there's a thought! A Goth theme with black buttons on a black
> >> | background that light up black when pressed. And a black screensaver.
> >>
> >> Just turn the thing off, we can say it is "hardcore goth" ;-)  and it
> >> never fails to meet user expectations either...
> >>
>
> _______________________________________________
> support mailing list
> support at lists.openmoko.org
> https://lists.openmoko.org/mailman/listinfo/support
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openmoko.org/pipermail/support/attachments/20080816/3fd44124/attachment.htm 


More information about the support mailing list