<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Autobrightness 7" Touchscreen based on Ambient Light]]></title><description><![CDATA[<p dir="auto">I found this posting and will try to install it this week. Just use google translate to translate from its native Turkish.</p>
<p dir="auto"><a href="http://www.ilhanakilli.com.tr/sbc/raspberry-pi-7-dokunmatik-ekran-otomatik-parlaklik/" target="_blank" rel="noopener noreferrer nofollow ugc">http://www.ilhanakilli.com.tr/sbc/raspberry-pi-7-dokunmatik-ekran-otomatik-parlaklik/</a></p>
]]></description><link>https://forum.magicmirror.builders/topic/7087/autobrightness-7-touchscreen-based-on-ambient-light</link><generator>RSS for Node</generator><lastBuildDate>Sat, 08 Aug 2026 15:52:45 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/7087.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 30 Apr 2018 15:57:40 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Autobrightness 7" Touchscreen based on Ambient Light on Tue, 01 May 2018 02:05:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hengy" aria-label="Profile: hengy">@<bdi>hengy</bdi></a><br />
Well it seems to be working. What was missing from the cut and paste I did of the code was</p>
<p dir="auto"><code>#! / Usr / local / bin / python</code></p>
<p dir="auto">Seems /usr/local/bin/python doesn’t exist on my pi. I changed it to usr/bin/python. Also<br />
okunan means read in Turkish. I changed it back to read. I ran this in a terminal and it seems to work. Nice, I now have a screen which changes to ambient light.</p>
]]></description><link>https://forum.magicmirror.builders/post/39134</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/39134</guid><dc:creator><![CDATA[hengy]]></dc:creator><pubDate>Tue, 01 May 2018 02:05:55 GMT</pubDate></item><item><title><![CDATA[Reply to Autobrightness 7" Touchscreen based on Ambient Light on Tue, 01 May 2018 00:58:44 GMT]]></title><description><![CDATA[<p dir="auto">Well I’ve done the wiring. I think it’s correct. I’m wiring directly with the pins on the pi.<br />
I get the error<br />
sudo: unable to execute ./backlight.py: No such file or directory</p>
<p dir="auto">Here’s the code. Any help would be appreciated.</p>
<pre><code class="language-#!">import RPi.GPIO as GPIO
import time
In gpıo.setmo (GPIO.BOARD)
#ldr reading pisi identification
pin_to_ldr = 7
def rc_time (pin_to_ldr):
	count = 0
  
	#Output on the pin for 
	GPIO.setup (pin_to_ldr, GPIO.OUT)
	GPIO.output (pin_to_ldr, GPIO.LOW)
	time.sleep (0.01)

	#Change the pin back to input
	GPIO.setup (pin_to_ldr, GPIO.IN)
	#Count until the pin goes high
	while (GPIO.input (pin_to_ldr) == GPIO.LOW):
        	count + = 1

	return count

#Catch when script is interrupted, cleanup correctly
try:
	# Main loop
	while True:
		bl = open ('/ sys / class / backlight / rpi_backlight / brightness', 'w'
		read = 0
		read = rc_time (pin_to_ldr)
		if read</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/39133</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/39133</guid><dc:creator><![CDATA[hengy]]></dc:creator><pubDate>Tue, 01 May 2018 00:58:44 GMT</pubDate></item></channel></rss>