<?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[How can I change a variable value &#x27;on board&#x27;...]]></title><description><![CDATA[<p dir="auto">I finally have all that I need to move on with my boards.</p>
<p dir="auto">One of my first desired sensors is my waterflow project to enable/disable a warm water pump.</p>
<p dir="auto">However, there is one very important variable that I need to fine-tune over time.<br />
Instead of having to attach my laptop each time I would like to do that 'on-board'.</p>
<p dir="auto">I was thinking about adding a double dip switch.</p>
<p dir="auto">switch 1 to enable a led to blink to help me when fine-tuning.<br />
switch 2 to enable changing the value.</p>
<p dir="auto">Question: what do I need?<br />
Is it a pot meter?<br />
If so how do I program it to change the value and what resistance do I need?</p>
<p dir="auto">I hope someone can help me to figure this out :)</p>
]]></description><link>https://forum.mysensors.org/topic/178/how-can-i-change-a-variable-value-on-board</link><generator>RSS for Node</generator><lastBuildDate>Sun, 07 Jun 2026 16:53:41 GMT</lastBuildDate><atom:link href="https://forum.mysensors.org/topic/178.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 10 Jul 2014 12:58:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How can I change a variable value &#x27;on board&#x27;... on Sat, 12 Jul 2014 07:19:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/c4vette" aria-label="Profile: C4Vette">@<bdi>C4Vette</bdi></a> Thank I will order one :)</p>
]]></description><link>https://forum.mysensors.org/post/1585</link><guid isPermaLink="true">https://forum.mysensors.org/post/1585</guid><dc:creator><![CDATA[marceltrapman]]></dc:creator><pubDate>Sat, 12 Jul 2014 07:19:31 GMT</pubDate></item><item><title><![CDATA[Reply to How can I change a variable value &#x27;on board&#x27;... on Fri, 11 Jul 2014 21:47:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/marceltrapman" aria-label="Profile: marceltrapman">@<bdi>marceltrapman</bdi></a><br />
I would use a 10K pot.meter and connect the outer pins to +5 and gnd. Connect the pin in the middle to an analogue pin and use:<br />
val = analogRead(potPin) which will give you a value between  0 and 1023.</p>
]]></description><link>https://forum.mysensors.org/post/1569</link><guid isPermaLink="true">https://forum.mysensors.org/post/1569</guid><dc:creator><![CDATA[C4Vette]]></dc:creator><pubDate>Fri, 11 Jul 2014 21:47:09 GMT</pubDate></item><item><title><![CDATA[Reply to How can I change a variable value &#x27;on board&#x27;... on Thu, 10 Jul 2014 21:18:26 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/c4vette" aria-label="Profile: C4Vette">@<bdi>C4Vette</bdi></a> The one I am testing with can not be turned to 0 as far as I have seen but I will certainly check this with the ones for production.<br />
Can I simply add a resistor or do I have to do something else?</p>
]]></description><link>https://forum.mysensors.org/post/1498</link><guid isPermaLink="true">https://forum.mysensors.org/post/1498</guid><dc:creator><![CDATA[marceltrapman]]></dc:creator><pubDate>Thu, 10 Jul 2014 21:18:26 GMT</pubDate></item><item><title><![CDATA[Reply to How can I change a variable value &#x27;on board&#x27;... on Thu, 10 Jul 2014 20:50:34 GMT]]></title><description><![CDATA[<p dir="auto">Or calculate: I=U/R<br />
Take care about how the pot is connected. If it is possible to turn it to zero it will become a shorted output pin!<br />
Found on the internet: "<em>The microcontroller datasheet specifies an absolute maximum per-pin current of 40mA. With a typical internal resistance of only 25 ohms per pin, a dead short to ground can allow as much as 200mA of current to flow, more than enough to destroy the microcontroller output".</em></p>
]]></description><link>https://forum.mysensors.org/post/1497</link><guid isPermaLink="true">https://forum.mysensors.org/post/1497</guid><dc:creator><![CDATA[C4Vette]]></dc:creator><pubDate>Thu, 10 Jul 2014 20:50:34 GMT</pubDate></item><item><title><![CDATA[Reply to How can I change a variable value &#x27;on board&#x27;... on Thu, 10 Jul 2014 19:30:22 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/marceltrapman" aria-label="Profile: marceltrapman">@<bdi>marceltrapman</bdi></a> said:</p>
<blockquote>
<p dir="auto">Will checking the value of the pot meter in the loop use (much) current?</p>
</blockquote>
<p dir="auto">If you have a multimeter you should be able to measure it.</p>
]]></description><link>https://forum.mysensors.org/post/1494</link><guid isPermaLink="true">https://forum.mysensors.org/post/1494</guid><dc:creator><![CDATA[hek]]></dc:creator><pubDate>Thu, 10 Jul 2014 19:30:22 GMT</pubDate></item><item><title><![CDATA[Reply to How can I change a variable value &#x27;on board&#x27;... on Thu, 10 Jul 2014 14:34:09 GMT]]></title><description><![CDATA[<p dir="auto">OK, part of this was too simple to even think of asking for an answer.</p>
<p dir="auto">The pot meter is implemented and it works as expected.<br />
The led is added with the dip switch for on/off (save current).</p>
<p dir="auto">Now a more important question:<br />
Will checking the value of the pot meter in the loop use (much) current?</p>
<p dir="auto">How would I reliably measure this?</p>
]]></description><link>https://forum.mysensors.org/post/1466</link><guid isPermaLink="true">https://forum.mysensors.org/post/1466</guid><dc:creator><![CDATA[marceltrapman]]></dc:creator><pubDate>Thu, 10 Jul 2014 14:34:09 GMT</pubDate></item></channel></rss>