<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Arduino Starter Kit - Love Meter with faster Reset</title><link>/products/arduino/arduino-projects/b/blog/posts/arduino-starter-kit---love-meter-with-faster-reset</link><description>So I was trying to figure out a decent way to speed up the time it took to reset I ended up taking another instance of the low being +2 and then adding the first high-low-low as being 2.25 degrees I have added a few video&amp;#39;s so you can see the res...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Arduino Starter Kit - Love Meter with faster Reset</title><link>https://community.element14.com/products/arduino/arduino-projects/b/blog/posts/arduino-starter-kit---love-meter-with-faster-reset</link><pubDate>Thu, 11 Jan 2018 14:43:56 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:00116ad9-b932-441d-a1e5-1435fc75f218</guid><dc:creator>genebren</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;It is fun to solve problems in software, but the truth here is that the problem exists in physics.&amp;nbsp; The &amp;#39;reset&amp;#39; time has more to do with the heat that you have applied to the sensor and the time it takes for that heat to dissipate. To speed up your reset time you could use a small fan to blow ambient air across the sensor.&amp;nbsp; To do this you will need some code.&amp;nbsp; While the temperature is near ambient the fan needs to be off.&amp;nbsp; When the temperature is rising or holding the fan also needs to be off.&amp;nbsp; When the temperature is above ambient and is falling then the fan is turned on.&amp;nbsp; (Be careful to get a tiny fan that can be driven safely by the arduino and one that will no attack your fingers)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Have fun, but be safe.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=4101&amp;AppID=149&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Arduino Starter Kit - Love Meter with faster Reset</title><link>https://community.element14.com/products/arduino/arduino-projects/b/blog/posts/arduino-starter-kit---love-meter-with-faster-reset</link><pubDate>Thu, 11 Jan 2018 02:51:52 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:00116ad9-b932-441d-a1e5-1435fc75f218</guid><dc:creator>mcb1</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;They are addictive aren&amp;#39;t they.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:3ef06e6b-9b7d-4651-b12d-db8be7f5e991:type=c_cpp&amp;amp;text=%2F%2FLOVE+METER+WITH+FASTER+RESET.%0Aconst+int+sensorPin+%3D+A0%3Bconst+float+baselineTemp+%3D+22.0%3B%0Avoid+setup%28%29%7B+++Serial.begin%289600%29%3B+%0A++for%28int+pinNumber+%3D+2%3B+pinNumber%3C5%3B+pinNumber%2B%2B%29%7B+++++%0ApinMode%28pinNumber%2COUTPUT%29%3B++++%0A+digitalWrite%28pinNumber%2C+LOW%29%3B++%0A+%7D%0A%7D+%0Avoid+loop%28%29%7B++%0A+int+sensorVal+%3D+analogRead%28sensorPin%29%3B+++%0ASerial.print%28%22Sensor+Value%3A+%22%29%3B+++%0ASerial.print%28sensorVal%29%3B+++%0Afloat+voltage+%3D+%28sensorVal%2F1024.0%29+*+5.0%3B+++%0ASerial.print%28%22%2C+Volts%3A+%22%29%3B+++%0ASerial.print%28voltage%29%3B++%0ASerial.print%28%22%2C+degrees+C%3A+%22%29%3B++%0Afloat+temperature+%3D+%28voltage+-+.5%29+*+100%3B+++%0ASerial.println%28temperature%29%3B+++++%0Aif%28temperature+%3C+baselineTemp%29%7B+++++%0AdigitalWrite%282%2C+LOW%29%3B+++++%0AdigitalWrite%283%2C+LOW%29%3B+++++%0AdigitalWrite%284%2C+LOW%29%3B++%0A+%7D+++%0Aelse+if%28temperature+%3E%3D+baselineTemp%2B2.25+%26%26+temperature+%3C+baselineTemp%2B4%29%7B+++++%0AdigitalWrite%282%2C+HIGH%29%3B+++++%0AdigitalWrite%283%2C+LOW%29%3B+++++%0AdigitalWrite%284%2C+LOW%29%3B+++%7D+++%0Aelse+if%28temperature+%3E%3D+baselineTemp%2B4+%26%26+temperature+%3C+baselineTemp%2B6%29%7B+++++%0AdigitalWrite%282%2C+HIGH%29%3B+++++%0AdigitalWrite%283%2C+HIGH%29%3B+++++%0AdigitalWrite%284%2C+LOW%29%3B+++%7D+++%0Aelse+if%28temperature+%3E%3D+baselineTemp%2B6%29%7B+++++%0AdigitalWrite%282%2C+HIGH%29%3B+++++%0AdigitalWrite%283%2C+HIGH%29%3B+++++digitalWrite%284%2C+HIGH%29%3B+++%0A%7D+++%0Aelse+if%28temperature+%3E%3D+baselineTemp%2B2%29%7B+++++%0AdigitalWrite%282%2C+LOW%29%3B+++++%0AdigitalWrite%283%2C+LOW%29%3B+++++%0AdigitalWrite%284%2C+LOW%29%3B+++%0A%7D+++%0Adelay%28.25%29%3B+%0A%7D]&lt;/p&gt;&lt;div&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;In your elseif statements, you are basically driving&lt;/p&gt;&lt;p&gt;Pin 2 = + 2.25 deg&lt;/p&gt;&lt;p&gt;Pin 3 = +4&lt;/p&gt;&lt;p&gt;Pin 4 =+ 6&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You could seperate these into an if statement to just control that Pin based on the baseline +xx.&lt;/p&gt;&lt;p&gt;eg High is it&amp;#39;s above or low if it isn&amp;#39;t.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You could also do some averaging for achieving the baseline temperature, rather than the fixed 22 degs.&lt;/p&gt;&lt;p&gt;You could read the temperature 5 or 10 times during the setup and then average it.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I can see that you&amp;#39;re wanting to work out the actual temperature from the ADC value.&lt;/p&gt;&lt;p&gt;Correct me if my algebra is wrong, but I thought voltage = sensorVal * 5/1024, based on the fullscale ADC is 1024 which represents 5 volts (default value)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Good example and explanantion is here.&lt;/p&gt;&lt;p&gt;&lt;a class="jive-link-external-small" href="https://learn.adafruit.com/tmp36-temperature-sensor/using-a-temp-sensor" rel="nofollow ugc noopener" target="_blank" title="https://learn.adafruit.com/tmp36-temperature-sensor/using-a-temp-sensor"&gt;https://learn.adafruit.com/tmp36-temperature-sensor/using-a-temp-sensor&lt;/a&gt; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;There is another very useful command called Map, that allows translation from one set of values into a range.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Personally I use the DS18B20&amp;#39;s for temperature measurement ...&lt;/p&gt;&lt;p&gt;I&amp;#39;d add a couple of the waterproof versions on your next buying trip.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Mark&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=4101&amp;AppID=149&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>