<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
  <channel>
    <title>Udvikleren.dk - Seneste [langsom] forum tråde</title>
    <description>De seneste forum tråde i [langsom] på Udvikleren.dk</description>
    <link>http://www.udvikleren.dk/</link>
    <pubDate>Wed, 29 Apr 2026 04:14:56 GMT</pubDate>
    <docs>http://backend.userland.com/rss</docs>
    <generator>Udvikleren.dk RSS Feeder</generator>
    <ttl>60</ttl>
    <item>
      <title>Arduino code kører langsomt</title>
      <description>Hejsa alle.&lt;br /&gt;&lt;br /&gt;Jeg sidder og roder lidt med at lave en lille styring i arduino med &lt;br /&gt;4 tmp9700 temperatur sensorer som skal vise temperaturen diverse steder og starte en blæser hvis en af dem bliver for varm. Samtidig med skal der være en lysstyring som jeg gerne ville have til at køre med en encoder og et PWM   &lt;br /&gt;output. Men problemet er at når arduinoen udregner de 4 temperaturer så kan jeg ikke bruge en encoder . Den tæller slet ikke. Jeg har så sat en alm. pot ind og bruger den på en analog input og ud fra den kan jeg sagtens styre output fint nok. men fra jeg drejer på potten til der sker noget tager ca 1 sekund. &lt;br /&gt;&lt;br /&gt;Nogen som har mod på at fortælle mig hvor det går galt henne i den her kode ? &lt;br /&gt;&lt;br /&gt;&lt;div class="codeboxheader" id="code_948227583" onclick="ToggleCodeBox(this.id);"&gt;&lt;img id="code_948227583_arrow" src="/images/icons/codeboxarrow_down.gif" alt="Fold kodeboks ind/ud" title="Fold kodeboks ind/ud" /&gt;C++ kode&amp;nbsp;&lt;/div&gt;&lt;pre id="code_948227583code" style="border-top: 0px; display: none;"&gt;&lt;ol&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #0000FF;"&gt;#include&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;lt;LiquidCrystal.h&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;#include&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;lt;Encoder.h&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;LiquidCrystal lcd(&lt;/span&gt;&lt;span style="color: #800080;"&gt;7&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #800080;"&gt;8&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #800080;"&gt;9&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #800080;"&gt;10&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #800080;"&gt;11&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #800080;"&gt;12&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;const&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; LED &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;13&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;const&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; FAN &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;3&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;const&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; potPin &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; A4;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; tempMin &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;10&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; tempMax &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;30&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; fanSpeed;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; fanLCD;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;const&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; analogInPin &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; A4;  &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt;  potentiometer &lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;const&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; analogOutPin &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;5&lt;/span&gt;&lt;span style="color: #000000;"&gt;; &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt;  LED &lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; sensorValue &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;0&lt;/span&gt;&lt;span style="color: #000000;"&gt;;        &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; value read from the pot&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; outputValue &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;0&lt;/span&gt;&lt;span style="color: #000000;"&gt;;        &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; value output to the PWM (analog out)&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; lightLCD &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;0&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; setup()&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;{&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  Serial.begin(&lt;/span&gt;&lt;span style="color: #800080;"&gt;9600&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  lcd.begin(&lt;/span&gt;&lt;span style="color: #800080;"&gt;20&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #800080;"&gt;4&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  pinMode(LED, OUTPUT);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  pinMode(FAN, OUTPUT);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  pinMode(&lt;/span&gt;&lt;span style="color: #800080;"&gt;5&lt;/span&gt;&lt;span style="color: #000000;"&gt;, OUTPUT);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;}&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;void&lt;/span&gt;&lt;span style="color: #000000;"&gt; loop()&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;{    &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; read the analog in value:&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;  sensorValue &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; analogRead(analogInPin);            &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; map it to the range of the analog out:&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;  outputValue &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; map(sensorValue, &lt;/span&gt;&lt;span style="color: #800080;"&gt;0&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #800080;"&gt;1023&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #800080;"&gt;0&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #800080;"&gt;255&lt;/span&gt;&lt;span style="color: #000000;"&gt;);  &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  &lt;/span&gt;&lt;span style="color: #008000;"&gt;//&lt;/span&gt;&lt;span style="color: #008000;"&gt; change the analog out value:&lt;/span&gt;&lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #008000;"&gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt;  lightLCD &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; map(outputValue, &lt;/span&gt;&lt;span style="color: #800080;"&gt;0&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #800080;"&gt;255&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #800080;"&gt;0&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #800080;"&gt;100&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  analogWrite(analogOutPin, outputValue);   &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;float&lt;/span&gt;&lt;span style="color: #000000;"&gt; temperature1 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;0.0&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;float&lt;/span&gt;&lt;span style="color: #000000;"&gt; temperature2 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;0.0&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;float&lt;/span&gt;&lt;span style="color: #000000;"&gt; temperature3 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;0.0&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;float&lt;/span&gt;&lt;span style="color: #000000;"&gt; temperature4 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;0.0&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; sample1;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; sample2;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; sample3;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;int&lt;/span&gt;&lt;span style="color: #000000;"&gt; sample4;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;float&lt;/span&gt;&lt;span style="color: #000000;"&gt; ten_samples1 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;0.0&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;float&lt;/span&gt;&lt;span style="color: #000000;"&gt; ten_samples2 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;0.0&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;float&lt;/span&gt;&lt;span style="color: #000000;"&gt; ten_samples3 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;0.0&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;float&lt;/span&gt;&lt;span style="color: #000000;"&gt; ten_samples4 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;0.0&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;for&lt;/span&gt;&lt;span style="color: #000000;"&gt; (sample1 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;0&lt;/span&gt;&lt;span style="color: #000000;"&gt;; sample1 &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;10&lt;/span&gt;&lt;span style="color: #000000;"&gt;; sample1&lt;/span&gt;&lt;span style="color: #000000;"&gt;++&lt;/span&gt;&lt;span style="color: #000000;"&gt;) {&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;      temperature1 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; ((&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;float&lt;/span&gt;&lt;span style="color: #000000;"&gt;)analogRead(A0) &lt;/span&gt;&lt;span style="color: #000000;"&gt;*&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;5.0&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;/&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;1024.0&lt;/span&gt;&lt;span style="color: #000000;"&gt;) &lt;/span&gt;&lt;span style="color: #000000;"&gt;-&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;0.5&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;      temperature1 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; temperature1 &lt;/span&gt;&lt;span style="color: #000000;"&gt;/&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;0.01&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;      delay(&lt;/span&gt;&lt;span style="color: #800080;"&gt;100&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;      ten_samples1 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; ten_samples1 &lt;/span&gt;&lt;span style="color: #000000;"&gt;+&lt;/span&gt;&lt;span style="color: #000000;"&gt; temperature1; }&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;for&lt;/span&gt;&lt;span style="color: #000000;"&gt; (sample2 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;0&lt;/span&gt;&lt;span style="color: #000000;"&gt;; sample2 &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;10&lt;/span&gt;&lt;span style="color: #000000;"&gt;; sample2&lt;/span&gt;&lt;span style="color: #000000;"&gt;++&lt;/span&gt;&lt;span style="color: #000000;"&gt;) {&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;      temperature2 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; ((&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;float&lt;/span&gt;&lt;span style="color: #000000;"&gt;)analogRead(A1) &lt;/span&gt;&lt;span style="color: #000000;"&gt;*&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;5.0&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;/&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;1024.0&lt;/span&gt;&lt;span style="color: #000000;"&gt;) &lt;/span&gt;&lt;span style="color: #000000;"&gt;-&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;0.5&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;      temperature2 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; temperature2 &lt;/span&gt;&lt;span style="color: #000000;"&gt;/&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;0.01&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;      delay(&lt;/span&gt;&lt;span style="color: #800080;"&gt;100&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;      ten_samples2 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; ten_samples2 &lt;/span&gt;&lt;span style="color: #000000;"&gt;+&lt;/span&gt;&lt;span style="color: #000000;"&gt; temperature2; }&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;for&lt;/span&gt;&lt;span style="color: #000000;"&gt; (sample3 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;0&lt;/span&gt;&lt;span style="color: #000000;"&gt;; sample3 &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;10&lt;/span&gt;&lt;span style="color: #000000;"&gt;; sample3&lt;/span&gt;&lt;span style="color: #000000;"&gt;++&lt;/span&gt;&lt;span style="color: #000000;"&gt;)  {&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;     temperature3 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; ((&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;float&lt;/span&gt;&lt;span style="color: #000000;"&gt;)analogRead(A2) &lt;/span&gt;&lt;span style="color: #000000;"&gt;*&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;5.0&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;/&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;1024.0&lt;/span&gt;&lt;span style="color: #000000;"&gt;) &lt;/span&gt;&lt;span style="color: #000000;"&gt;-&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;0.5&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;     temperature3 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; temperature3 &lt;/span&gt;&lt;span style="color: #000000;"&gt;/&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;0.01&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;     delay(&lt;/span&gt;&lt;span style="color: #800080;"&gt;100&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;     ten_samples3 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; ten_samples3 &lt;/span&gt;&lt;span style="color: #000000;"&gt;+&lt;/span&gt;&lt;span style="color: #000000;"&gt; temperature3;  }&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;for&lt;/span&gt;&lt;span style="color: #000000;"&gt; (sample4 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;0&lt;/span&gt;&lt;span style="color: #000000;"&gt;; sample4 &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;10&lt;/span&gt;&lt;span style="color: #000000;"&gt;; sample4&lt;/span&gt;&lt;span style="color: #000000;"&gt;++&lt;/span&gt;&lt;span style="color: #000000;"&gt;) {&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;     temperature4 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; ((&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;float&lt;/span&gt;&lt;span style="color: #000000;"&gt;)analogRead(A3) &lt;/span&gt;&lt;span style="color: #000000;"&gt;*&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;5.0&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #000000;"&gt;/&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;1024.0&lt;/span&gt;&lt;span style="color: #000000;"&gt;) &lt;/span&gt;&lt;span style="color: #000000;"&gt;-&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;0.5&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;     temperature4 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; temperature4 &lt;/span&gt;&lt;span style="color: #000000;"&gt;/&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;0.01&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;     delay(&lt;/span&gt;&lt;span style="color: #800080;"&gt;100&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;     ten_samples4 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; ten_samples4 &lt;/span&gt;&lt;span style="color: #000000;"&gt;+&lt;/span&gt;&lt;span style="color: #000000;"&gt; temperature4; }&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  temperature1 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; ten_samples1 &lt;/span&gt;&lt;span style="color: #000000;"&gt;/&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;10.0&lt;/span&gt;&lt;span style="color: #000000;"&gt;;   &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  temperature2 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; ten_samples2 &lt;/span&gt;&lt;span style="color: #000000;"&gt;/&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;10.0&lt;/span&gt;&lt;span style="color: #000000;"&gt;; &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  temperature3 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; ten_samples3 &lt;/span&gt;&lt;span style="color: #000000;"&gt;/&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;10.0&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  temperature4 &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; ten_samples4 &lt;/span&gt;&lt;span style="color: #000000;"&gt;/&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;10.0&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  lcd.setCursor(&lt;/span&gt;&lt;span style="color: #800080;"&gt;0&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #800080;"&gt;0&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  lcd.print(&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;INDE &lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  lcd.print(temperature1);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  lcd.setCursor(&lt;/span&gt;&lt;span style="color: #800080;"&gt;0&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #800080;"&gt;1&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  lcd.print(&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;UDE  &lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  lcd.print(temperature2);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  lcd.setCursor(&lt;/span&gt;&lt;span style="color: #800080;"&gt;0&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #800080;"&gt;2&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  lcd.print(&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;KOLE &lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  lcd.print(temperature3);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  lcd.setCursor(&lt;/span&gt;&lt;span style="color: #800080;"&gt;0&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #800080;"&gt;3&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  lcd.print(&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;FAN  &lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  lcd.print(temperature4);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;if&lt;/span&gt;&lt;span style="color: #000000;"&gt; (temperature1 &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; tempMin) {&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    fanSpeed &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; &lt;/span&gt;&lt;span style="color: #800080;"&gt;0&lt;/span&gt;&lt;span style="color: #000000;"&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    digitalWrite(FAN, LOW);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    }&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;if&lt;/span&gt;&lt;span style="color: #000000;"&gt;((temperature1 &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; tempMin) &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span style="color: #000000;"&gt; (temperature1 &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;lt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; tempMax)) {&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    fanSpeed &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; map(temperature1, tempMin, tempMax, &lt;/span&gt;&lt;span style="color: #800080;"&gt;32&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #800080;"&gt;255&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    fanLCD &lt;/span&gt;&lt;span style="color: #000000;"&gt;=&lt;/span&gt;&lt;span style="color: #000000;"&gt; map(temperature1, tempMin, tempMax, &lt;/span&gt;&lt;span style="color: #800080;"&gt;0&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #800080;"&gt;100&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    analogWrite(FAN, fanSpeed);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    }&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;    &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;span style="color: #0000FF;"&gt;if&lt;/span&gt;&lt;span style="color: #000000;"&gt;(temperature1 &lt;/span&gt;&lt;span style="color: #000000;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: #000000;"&gt; tempMax) {&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  digitalWrite(LED, HIGH);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;} &lt;/span&gt;&lt;span style="color: #0000FF;"&gt;else&lt;/span&gt;&lt;span style="color: #000000;"&gt; {&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;  digitalWrite(LED, LOW);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;}&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;lcd.setCursor(&lt;/span&gt;&lt;span style="color: #800080;"&gt;11&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #800080;"&gt;0&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;lcd.print(&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;FAN SPEED&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;lcd.setCursor(&lt;/span&gt;&lt;span style="color: #800080;"&gt;11&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #800080;"&gt;1&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;lcd.print(fanLCD);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;lcd.print(&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;%&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;lcd.setCursor(&lt;/span&gt;&lt;span style="color: #800080;"&gt;11&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #800080;"&gt;2&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;lcd.print(&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;LYS&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;lcd.setCursor(&lt;/span&gt;&lt;span style="color: #800080;"&gt;11&lt;/span&gt;&lt;span style="color: #000000;"&gt;, &lt;/span&gt;&lt;span style="color: #800080;"&gt;3&lt;/span&gt;&lt;span style="color: #000000;"&gt;);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;lcd.print(lightLCD);&lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;lcd.print(&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #800000;"&gt;%&lt;/span&gt;&lt;span style="color: #800000;"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #000000;"&gt;); &lt;/span&gt;&lt;/li&gt;&lt;li style="padding: 0; margin: 0;"&gt; &lt;span style="color: #000000;"&gt;}&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;</description>
      <link>http://www.udvikleren.dk/forum/46140/arduino-code-koerer-langsomt/</link>
      <pubDate>Wed, 06 Aug 2014 18:31:07 GMT</pubDate>
    </item>
  </channel>
</rss>