<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Analog Input on Bald Engineer</title><link>https://www.baldengineer.com/tag/analog-input</link><description>Recent content in Analog Input on Bald Engineer</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Sat, 02 Apr 2022 22:48:06 +0000</lastBuildDate><atom:link href="https://www.baldengineer.com/tag/analog-input/index.xml" rel="self" type="application/rss+xml"/><item><title>Arduino pinMode(): When to use and why</title><link>https://www.baldengineer.com/when-to-use-arduinos-pinmode-and-why.html</link><pubDate>Mon, 11 Nov 2013 11:57:39 +0000</pubDate><guid isPermaLink="false">https://www.baldengineer.com/?p=1923</guid><description>&lt;p&gt;All Arduino boards have GPIO pins with digital and analog capabilities. The Arduino pinMode() function determines how the pins will operate. A surprise might be that in some cases it is not necessary to use it. And when you do, pinMode() may not always work the way you expect. This post outlines how the Arduino pinMode() function works and when you should (or not should) use it.&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-c" data-lang="c"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nf"&gt;pinMode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;13&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;OUTPUT&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="arduino-pinmode-scope"&gt;Arduino pinMode() scope&lt;/h2&gt;&#10;&lt;p&gt;This post focuses on the 8-bit AVR Arduino boards such as the Uno, Mega, and Leonardo. The processors on these boards are the ATmega328, ATmega2560, and ATmega32u4, in that order.  For the most part, this information does apply to non-AVR and 32-bit Arduino variants. When in doubt, double check with the &lt;a href="https://www.arduino.cc/reference/en/"&gt;Arduino Reference pages&lt;/a&gt; for details to specific platforms.&lt;/p&gt;</description></item></channel></rss>