<div dir="ltr">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&#39;m not much of a python guru and already I can&#39;t find out why open() has a third argument. I&#39;m only used to seeing two and searching open for 3 arguments comes up with nothing. I don&#39;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 &#39;/<b>sys/devices/platform/s3c2440-i2c/i2c-adapter/i2c-0/0-0073/backlight/pcf50633-bl/brightness&#39;</b> ? Thanks again for all your help!<br>
<br>Lynn<br><br><div class="gmail_quote">On Thu, Aug 14, 2008 at 1:07 PM, Aapo Rantalainen <span dir="ltr">&lt;<a href="mailto:aapo.rantalainen@gmail.com">aapo.rantalainen@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2008/8/14 Lynn Nguyen &lt;<a href="mailto:lynn.mesl@gmail.com">lynn.mesl@gmail.com</a>&gt;:<br>
<div class="Ih2E3d">&gt; I mean, is there some way to control it within in application? In like say<br>
&gt; C, python, or java? Not on a shell?<br>
<br>
<br>
</div>I think best way to tell something is use shell. This is some python<br>
application to fade screen black and light again. This is not screen<br>
saver, there is no input reading etc. This is only my way to say how<br>
shell -&gt; python (or if you can write in file with java, then shell -&gt;<br>
java)<br>
<br>
Should this be in wiki? And what is the right page?<br>
<br>
<br>
#!/usr/bin/python<br>
&quot;&quot;&quot;Dims backlight (and lights its again)<br>
<br>
Usage: python dim.py<br>
&quot;&quot;&quot;<br>
import sys<br>
import time<br>
<br>
def dim():<br>
 &nbsp; &nbsp;global brig<br>
 &nbsp; &nbsp;brig = open(&quot;/sys/devices/platform/s3c2440-i2c/i2c-adapter/i2c-0/0-0073/backlight/pcf50633-bl/brightness&quot;,<br>
&quot;w&quot;, 1)<br>
 &nbsp; &nbsp;duration = 0.200<br>
<br>
 &nbsp; &nbsp;for i in range(7):<br>
 &nbsp; &nbsp; &nbsp; brig.write(str((6-i)*10) + &quot;\n&quot;)<br>
 &nbsp; &nbsp; &nbsp; time.sleep(duration)<br>
<br>
 &nbsp; &nbsp;time.sleep(duration*5)<br>
<br>
 &nbsp; &nbsp;for i in range(7):<br>
 &nbsp; &nbsp; &nbsp; brig.write(str(i*10) + &quot;\n&quot;)<br>
 &nbsp; &nbsp; &nbsp; time.sleep(duration)<br>
<br>
<br>
 &nbsp; &nbsp;brig.write(str(63) + &quot;\n&quot;)<br>
 &nbsp; &nbsp;brig.close()<br>
<br>
if __name__ == &quot;__main__&quot;:<br>
 &nbsp; &nbsp;dim()<br>
<br>
<br>
-Aapo Rantalainen<br>
<br>
<br>
&gt; haha no.<br>
<div class="Ih2E3d">&gt;<br>
&gt;<br>
&gt; Thanks!<br>
&gt; Lynn<br>
&gt;<br>
&gt; On Wed, Aug 13, 2008 at 3:12 PM, Andy Green &lt;<a href="mailto:andy@openmoko.com">andy@openmoko.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; -----BEGIN PGP SIGNED MESSAGE-----<br>
&gt;&gt; Hash: SHA1<br>
&gt;&gt;<br>
&gt;&gt; Somebody in the thread at some point said:<br>
&gt;&gt; | Andy Green wrote:<br>
&gt;&gt; |&gt; Somebody in the thread at some point said:<br>
&gt;&gt; |&gt; | Hello all--<br>
&gt;&gt; |&gt; |<br>
&gt;&gt; |&gt; | I was wondering, is there some sort of application that will let me<br>
&gt;&gt; |&gt; | manually fade the openmoko screen to black? Similar to a screen<br>
&gt;&gt; saver?<br>
&gt;&gt; |&gt; | Thanks!<br>
&gt;&gt; |&gt;<br>
&gt;&gt; |&gt; What are you, some kind of Goth? &nbsp;:-)<br>
&gt;&gt; |&gt;<br>
&gt;&gt; |&gt; echo 0<br>
&gt;&gt; |&gt;<br>
&gt;&gt;<br>
&gt;&gt; |/sys/devices/platform/s3c2440-i2c/i2c-adapter/i2c-0/0-0073/backlight/pcf50633-bl/brightness<br>
&gt;&gt; |&gt;<br>
&gt;&gt; |&gt; -Andy<br>
&gt;&gt; | Now there&#39;s a thought! A Goth theme with black buttons on a black<br>
&gt;&gt; | background that light up black when pressed. And a black screensaver.<br>
&gt;&gt;<br>
&gt;&gt; Just turn the thing off, we can say it is &quot;hardcore goth&quot; ;-) &nbsp;and it<br>
&gt;&gt; never fails to meet user expectations either...<br>
&gt;&gt;<br>
<br>
</div><div><div></div><div class="Wj3C7c">_______________________________________________<br>
support mailing list<br>
<a href="mailto:support@lists.openmoko.org">support@lists.openmoko.org</a><br>
<a href="https://lists.openmoko.org/mailman/listinfo/support" target="_blank">https://lists.openmoko.org/mailman/listinfo/support</a><br>
</div></div></blockquote></div><br></div>