Application to fade screen

Aapo Rantalainen aapo.rantalainen at gmail.com
Thu Aug 14 22:07:56 CEST 2008


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...
>>




More information about the support mailing list