<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: How to use a Potentiometer with Raspberry PI Pico (MicroPython)	</title>
	<atom:link href="https://peppe8o.com/potentiometer-raspberry-pi-pico-micropython/feed/" rel="self" type="application/rss+xml" />
	<link>https://peppe8o.com/potentiometer-raspberry-pi-pico-micropython/</link>
	<description>Raspberry PI, Arduino and Electronics made simple</description>
	<lastBuildDate>Mon, 25 Sep 2023 17:33:01 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>
		By: Andreas Gerth		</title>
		<link>https://peppe8o.com/potentiometer-raspberry-pi-pico-micropython/#comment-20978</link>

		<dc:creator><![CDATA[Andreas Gerth]]></dc:creator>
		<pubDate>Mon, 25 Sep 2023 17:33:01 +0000</pubDate>
		<guid isPermaLink="false">https://peppe8o.com/?p=10771#comment-20978</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://peppe8o.com/potentiometer-raspberry-pi-pico-micropython/#comment-20975&quot;&gt;Jonnathan Scott James&lt;/a&gt;.

what sense does it make to use this long code?
Purely in terms of execution speed, apart from the non-implementation of the &quot;time/utime&quot; library and much worse readability, especially when several of these functions are also combined with output formatting, I can&#039;t see any real advantage.

If you forego the explicit import function of a library component and leave the basic command import, this notation corresponds to the same waste of RAM as if you were importing these libraries in question via the import statement from __main__. This has an impact on the compiler cache.
It&#039;s more likely that your code with the many LEDs runs relatively well and flawlessly in WOKI. But this code can be shortened to over half of the program code using LIST mapping.
A nice code gimmick with maximum line lengths and without taking the Python format directive into account. Objectively readable code should contain line breaks &#039;\&#039; with a maximum display line length of 78 characters, which corresponds to the line length in the command shell.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://peppe8o.com/potentiometer-raspberry-pi-pico-micropython/#comment-20975">Jonnathan Scott James</a>.</p>
<p>what sense does it make to use this long code?<br />
Purely in terms of execution speed, apart from the non-implementation of the &#8220;time/utime&#8221; library and much worse readability, especially when several of these functions are also combined with output formatting, I can&#8217;t see any real advantage.</p>
<p>If you forego the explicit import function of a library component and leave the basic command import, this notation corresponds to the same waste of RAM as if you were importing these libraries in question via the import statement from __main__. This has an impact on the compiler cache.<br />
It&#8217;s more likely that your code with the many LEDs runs relatively well and flawlessly in WOKI. But this code can be shortened to over half of the program code using LIST mapping.<br />
A nice code gimmick with maximum line lengths and without taking the Python format directive into account. Objectively readable code should contain line breaks &#8216;\&#8217; with a maximum display line length of 78 characters, which corresponds to the line length in the command shell.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: peppe8o		</title>
		<link>https://peppe8o.com/potentiometer-raspberry-pi-pico-micropython/#comment-20977</link>

		<dc:creator><![CDATA[peppe8o]]></dc:creator>
		<pubDate>Sun, 24 Sep 2023 06:59:53 +0000</pubDate>
		<guid isPermaLink="false">https://peppe8o.com/?p=10771#comment-20977</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://peppe8o.com/potentiometer-raspberry-pi-pico-micropython/#comment-20975&quot;&gt;Jonnathan Scott James&lt;/a&gt;.

Wow, I must admit that I learned a new, interesting thing here today.
I tested it and discovered that you can use the machine library without expliciting it. So, for example:
&lt;code&gt;for machine import ADC
pot_pin = 26
pot = ADC(pot_pin)&lt;/code&gt;
works as well as:
&lt;code&gt;pot_pin = 26
pot = machine.ADC(pot_pin)&lt;/code&gt;

But this is not working with any module. For example, the &lt;code&gt;time.sleep()&lt;/code&gt; requires an explicit import of the time module or its sleep submodule.

Many thanks, Jonnathan!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://peppe8o.com/potentiometer-raspberry-pi-pico-micropython/#comment-20975">Jonnathan Scott James</a>.</p>
<p>Wow, I must admit that I learned a new, interesting thing here today.<br />
I tested it and discovered that you can use the machine library without expliciting it. So, for example:<br />
<code>for machine import ADC<br />
pot_pin = 26<br />
pot = ADC(pot_pin)</code><br />
works as well as:<br />
<code>pot_pin = 26<br />
pot = machine.ADC(pot_pin)</code></p>
<p>But this is not working with any module. For example, the <code>time.sleep()</code> requires an explicit import of the time module or its sleep submodule.</p>
<p>Many thanks, Jonnathan!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: peppe8o		</title>
		<link>https://peppe8o.com/potentiometer-raspberry-pi-pico-micropython/#comment-20976</link>

		<dc:creator><![CDATA[peppe8o]]></dc:creator>
		<pubDate>Sun, 24 Sep 2023 06:50:31 +0000</pubDate>
		<guid isPermaLink="false">https://peppe8o.com/?p=10771#comment-20976</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://peppe8o.com/potentiometer-raspberry-pi-pico-micropython/#comment-20974&quot;&gt;Jonnathan Scott James&lt;/a&gt;.

Thank you Jonnathan. Your project with LEDs controlled by a potentiometer and Raspberry PI Pico is really cool!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://peppe8o.com/potentiometer-raspberry-pi-pico-micropython/#comment-20974">Jonnathan Scott James</a>.</p>
<p>Thank you Jonnathan. Your project with LEDs controlled by a potentiometer and Raspberry PI Pico is really cool!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jonnathan Scott James		</title>
		<link>https://peppe8o.com/potentiometer-raspberry-pi-pico-micropython/#comment-20975</link>

		<dc:creator><![CDATA[Jonnathan Scott James]]></dc:creator>
		<pubDate>Sat, 23 Sep 2023 18:22:51 +0000</pubDate>
		<guid isPermaLink="false">https://peppe8o.com/?p=10771#comment-20975</guid>

					<description><![CDATA[no import command or external libraries are needed..
here are 3 examples
i discovered this and authored this line of code threw diligent trial and error based on my knowledge of python. 
&quot;&quot;&quot;&quot;
example #1:
&quot;&quot;&quot;&quot;&quot;
&#124;    print(machine.ADC(26).read_u16())
&quot;&quot;&quot;
example #2:
&quot;&quot;&quot;&quot;
&#124;while 1:
&#124;    print(machine.ADC(26).read_u16())
&quot;&quot;&quot;
example #3:
&quot;&quot;&quot;
a= machine.ADC(26).read_u16()
print(a)
&quot;&quot;&quot;
thankyou]]></description>
			<content:encoded><![CDATA[<p>no import command or external libraries are needed..<br />
here are 3 examples<br />
i discovered this and authored this line of code threw diligent trial and error based on my knowledge of python.<br />
&#8220;&#8221;&#8221;&#8221;<br />
example #1:<br />
&#8220;&#8221;&#8221;&#8221;&#8221;<br />
|    print(machine.ADC(26).read_u16())<br />
&#8220;&#8221;&#8221;<br />
example #2:<br />
&#8220;&#8221;&#8221;&#8221;<br />
|while 1:<br />
|    print(machine.ADC(26).read_u16())<br />
&#8220;&#8221;&#8221;<br />
example #3:<br />
&#8220;&#8221;&#8221;<br />
a= machine.ADC(26).read_u16()<br />
print(a)<br />
&#8220;&#8221;&#8221;<br />
thankyou</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jonnathan Scott James		</title>
		<link>https://peppe8o.com/potentiometer-raspberry-pi-pico-micropython/#comment-20974</link>

		<dc:creator><![CDATA[Jonnathan Scott James]]></dc:creator>
		<pubDate>Sat, 23 Sep 2023 16:56:52 +0000</pubDate>
		<guid isPermaLink="false">https://peppe8o.com/?p=10771#comment-20974</guid>

					<description><![CDATA[potentiometer selects one of 27 led&#039;s micropythom wojwi 
https://wokwi.com/projects/368717549372526593]]></description>
			<content:encoded><![CDATA[<p>potentiometer selects one of 27 led&#8217;s micropythom wojwi<br />
<a href="https://wokwi.com/projects/368717549372526593" rel="nofollow ugc">https://wokwi.com/projects/368717549372526593</a></p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
