<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.sketching-with-hardware.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Light-Dependent_Resistors</id>
	<title>Light-Dependent Resistors - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://www.sketching-with-hardware.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Light-Dependent_Resistors"/>
	<link rel="alternate" type="text/html" href="http://www.sketching-with-hardware.org/wiki/index.php?title=Light-Dependent_Resistors&amp;action=history"/>
	<updated>2026-05-13T03:32:52Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>http://www.sketching-with-hardware.org/wiki/index.php?title=Light-Dependent_Resistors&amp;diff=1466&amp;oldid=prev</id>
		<title>Mayersven at 07:51, 11 June 2024</title>
		<link rel="alternate" type="text/html" href="http://www.sketching-with-hardware.org/wiki/index.php?title=Light-Dependent_Resistors&amp;diff=1466&amp;oldid=prev"/>
		<updated>2024-06-11T07:51:04Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:51, 11 June 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l46&quot;&gt;Line 46:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 46:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Related Tutorial Videos =&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;= Related Tutorial Videos =&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;youtube&amp;gt;gjj5KyK2qGI&amp;lt;/youtube&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;youtube&amp;gt;gjj5KyK2qGI&amp;lt;/youtube&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Sensor]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Mayersven</name></author>
	</entry>
	<entry>
		<id>http://www.sketching-with-hardware.org/wiki/index.php?title=Light-Dependent_Resistors&amp;diff=1432&amp;oldid=prev</id>
		<title>Mayersven: Created page with &quot;= Description = An LDR is a light-dependent resistor. It changes it&#039;s resistance depending on the light falling onto the LDR.  200px  = How to connect it el...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.sketching-with-hardware.org/wiki/index.php?title=Light-Dependent_Resistors&amp;diff=1432&amp;oldid=prev"/>
		<updated>2024-06-10T22:39:05Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Description = An LDR is a light-dependent resistor. It changes it&amp;#039;s resistance depending on the light falling onto the LDR.  &lt;a href=&quot;/wiki/File:Ldr01.PNG&quot; title=&quot;File:Ldr01.PNG&quot;&gt;200px&lt;/a&gt;  = How to connect it el...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Description =&lt;br /&gt;
An LDR is a light-dependent resistor. It changes it&amp;#039;s resistance depending on the light falling onto the LDR.&lt;br /&gt;
&lt;br /&gt;
[[File:Ldr01.PNG|200px]]&lt;br /&gt;
&lt;br /&gt;
= How to connect it electrically =&lt;br /&gt;
Connecting the light dependent resistor (LDR). The value you read is dependent on how bright it is.&lt;br /&gt;
&lt;br /&gt;
[[File:Rldr.JPG|300px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= How to control it in MicroPython =&lt;br /&gt;
This makes Pin 34 an analog input and set it to 12 bit. It reads the analog value every second and print it to the console.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;#039;line&amp;#039;&amp;gt;&lt;br /&gt;
#Example usage for ESP32&lt;br /&gt;
from machine import Pin, ADC&lt;br /&gt;
from time import sleep&lt;br /&gt;
&lt;br /&gt;
analogPin = ADC(Pin(34))&lt;br /&gt;
analogPin.atten(ADC.ATTN_11DB)&lt;br /&gt;
&lt;br /&gt;
while True:&lt;br /&gt;
  analogVal = analogPin.read()&lt;br /&gt;
  print(analogVal)&lt;br /&gt;
  sleep(1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Code Example Arduino Nano Connect RP2040 ==&lt;br /&gt;
A0 is the analog input with 16 bit resolution. It reads the analog value every second and print it to the console-&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line=&amp;#039;line&amp;#039;&amp;gt;&lt;br /&gt;
#Example usage for Arduino Nano&lt;br /&gt;
from machine import Pin, ADC&lt;br /&gt;
from time import sleep&lt;br /&gt;
&lt;br /&gt;
analogPin = ADC(Pin(26))&lt;br /&gt;
&lt;br /&gt;
while True:&lt;br /&gt;
  analogVal16 = analogPin.read_u16()&lt;br /&gt;
  print(analogVal16)&lt;br /&gt;
  sleep(1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Related Tutorial Videos =&lt;br /&gt;
&amp;lt;youtube&amp;gt;gjj5KyK2qGI&amp;lt;/youtube&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mayersven</name></author>
	</entry>
</feed>