Re: Application to fade screen
>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. Actually I do not why there are three arguments in open(), but it do not work without the last 1. I take that on this page: http://wiki.openmoko.org/wiki/Vibrator >I don't get the purpose of writing numbers to the file? This is not a normal file. This is the ancient UNIX (and therefor modern Linux) way to handle with different kind of devices. > Do the numbers control how much it fades? Number is the wanted brightness. > and what is 63 for? 63 is the maximum value. I have never hearded about this file, until this messagechain, so I ask the current value of it cat /sys/devices/platform/s3c2440-i2c/i2c-adapter/i2c-0/0-0073/backlight/pcf50633-bl/brightness And it said 63. I wanted it more bright so I tried echo 64 > /sys/devices/platform/s3c2440-i2c/i2c-adapter/i2c-0/0-0073/backlight/pcf50633-bl/brightness And it said: echo: write error: Invalid argument So I thought maybe 63 is the maximum value. And surprisingly sametime in devel-list I got verification and much more: http://lists.openmoko.org/nabble.html#nabble-td726729 If you are interested in other device-files, there are some list (not complete): http://wiki.openmoko.org/wiki/GTA02_sysfs -Aapo Rantalainen ___ support mailing list support@lists.openmoko.org https://lists.openmoko.org/mailman/listinfo/support
Re: Application to fade screen
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 < [EMAIL PROTECTED]> wrote: > 2008/8/14 Lynn Nguyen <[EMAIL PROTECTED]>: > > 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 <[EMAIL PROTECTED]> 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@lists.openmoko.org > https://lists.openmoko.org/mailman/listinfo/support > ___ support mailing list support@lists.openmoko.org https://lists.openmoko.org/mailman/listinfo/support
Re: Application to fade screen
2008/8/14 Lynn Nguyen <[EMAIL PROTECTED]>: > 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 <[EMAIL PROTECTED]> 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@lists.openmoko.org https://lists.openmoko.org/mailman/listinfo/support
Re: Application to fade screen
haha no. I mean, is there some way to control it within in application? In like say C, python, or java? Not on a shell? Thanks! Lynn On Wed, Aug 13, 2008 at 3:12 PM, Andy Green <[EMAIL PROTECTED]> 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... > > - -Andy > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.9 (GNU/Linux) > Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org > > iEYEARECAAYFAkijXDEACgkQOjLpvpq7dMqP8QCeLFVz5FVzixmH6eaUiGktzX0n > 0o4An3r3MTKpWX1zsa4zWhOJ2ltg6n9n > =xiu1 > -END PGP SIGNATURE- > > ___ > support mailing list > support@lists.openmoko.org > https://lists.openmoko.org/mailman/listinfo/support > ___ support mailing list support@lists.openmoko.org https://lists.openmoko.org/mailman/listinfo/support
Re: Application to fade screen
-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... - -Andy -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAkijXDEACgkQOjLpvpq7dMqP8QCeLFVz5FVzixmH6eaUiGktzX0n 0o4An3r3MTKpWX1zsa4zWhOJ2ltg6n9n =xiu1 -END PGP SIGNATURE- ___ support mailing list support@lists.openmoko.org https://lists.openmoko.org/mailman/listinfo/support
Re: Application to fade screen
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. ___ support mailing list support@lists.openmoko.org https://lists.openmoko.org/mailman/listinfo/support ___ support mailing list support@lists.openmoko.org https://lists.openmoko.org/mailman/listinfo/support
Re: Application to fade screen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Somebody in the thread at some point said: | |/sys/devices/platform/s3c2440-i2c/i2c-adapter/i2c-0/0-0073/backlight/pcf50633-bl/brightness Wow thunderbird thought it knew better... that's actually a greater-than symbol not a pipe symbol. - -Andy -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAkijHtMACgkQOjLpvpq7dMqsjgCfYUTrZ822dGrslNjDz4+idwq5 ZdEAn1YJb4Tnd57DGYs9hXcgEvLj9LT2 =HstU -END PGP SIGNATURE- ___ support mailing list support@lists.openmoko.org https://lists.openmoko.org/mailman/listinfo/support
Re: Application to fade screen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 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 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iEYEARECAAYFAkijHhMACgkQOjLpvpq7dMoB7wCfSm48iVMHo4x/UwzzXB/iLwZ9 BnYAn1sCvihXkGZe5x4+iZWFYHcA6816 =r6Y4 -END PGP SIGNATURE- ___ support mailing list support@lists.openmoko.org https://lists.openmoko.org/mailman/listinfo/support
Application to fade screen
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! Lynn ___ support mailing list support@lists.openmoko.org https://lists.openmoko.org/mailman/listinfo/support