1Set up the Raspberry Pi
2Electrical Connection of Sensores and Actuators
3Set up the Connection
4Heating Control

no warranty for any of the provided information

HV_colorMap

Is used by:
HV_showHouse

To have a unicly defined color map for all temperatures this function returns the appropriate color for the given temperature argument. (Additionally a text color which contrasts nicely to the temperature color is returned.)

If the temperature argument is set to 'bar', the color bar is composed and returned as html.

<?php 
/* published under GPL www.gnu.org/licenses/gpl.html */
  /*
   echo "<html><table>";
   $bar = HV_colorMap("bar");
   echo $bar;
   }
   echo "</table></html>";
  */

function HV_colorMap($T){
  /* old set
  $bgc["-10"]="#000066"; $txt["-10"]="white";
  $bgc["0"]  ="#0000ff"; $txt["0"]  ="white";
  $bgc["10"] ="#0066ff"; $txt["10"] ="black";
  $bgc["20"] ="#00ffd6"; $txt["20"] ="black";
  $bgc["30"] ="#00ff33"; $txt["30"] ="black";
  $bgc["40"] ="#ffff00"; $txt["40"] ="black";
  $bgc["50"] ="#ff9900"; $txt["50"] ="black";
  $bgc["60"] ="#ff0000"; $txt["60"] ="white";
  $bgc["70"] ="#b80096"; $txt["70"] ="white";
  $bgc["80"] ="fuchsia"; $txt["80"] ="black";
  */
  $bgc["-10"]="#01006c"; $txt["-10"]="white";
  $bgc["-5"] ="#0000fe"; $txt["-5"] ="white";
  $bgc["0"]  ="#0c2df6"; $txt["0"]  ="white";
  $bgc["5"]  ="#0062ff"; $txt["5"]  ="white";
  $bgc["10"] ="#0099ff"; $txt["10"] ="black";
  $bgc["15"] ="#00ccff"; $txt["15"] ="black";
  $bgc["20"] ="#339933"; $txt["20"] ="white";
  $bgc["25"] ="#009900"; $txt["25"] ="white";
  $bgc["30"] ="#33cc33"; $txt["30"] ="black";
  $bgc["35"] ="#69ff65"; $txt["35"] ="black";
  $bgc["40"] ="#ffff66"; $txt["40"] ="black";
  $bgc["45"] ="#ffff00"; $txt["45"] ="black";
  $bgc["50"] ="#ff9703"; $txt["50"] ="black";
  $bgc["55"] ="#fc6700"; $txt["55"] ="black";
  $bgc["60"] ="#ff3300"; $txt["60"] ="white";
  $bgc["65"] ="#ff68a5"; $txt["65"] ="white";
  $bgc["70"] ="#cc3467"; $txt["70"] ="white";
  $bgc["75"] ="fuchsia"; $txt["75"] ="black";

  if($T=="bar"){
    $colorBar ="<table>";
    $keys = array_keys($bgc);
    $NoColors=count($bgc);
    for ($c=0;$c<$NoColors;$c++){
      $cc=$NoColors-$c-1;
      $colorBar.="<tr><td align='right'
                  style='background-color:".$bgc[$keys[$cc]].";
                  color:".$txt[$keys[$cc]].";'>".$keys[$cc]."</td></tr>";
    } #c
    $colorBar.="</table>";
    return $colorBar;
  }else{
    $keys = array_keys($bgc);
    $NoColors=count($bgc);
    for ($c=0;$c<$NoColors;$c++){
      $thisKey=$keys[$NoColors-$c-1];
      if($T>1.0*$thisKey-2.5){
	return array($bgc[$thisKey],$txt[$thisKey]);
      } #fi
    } #c
    return array("white","black");
  }
}
?>
1HV_Admin_Login
2HV_colorMap
3HV_config
4HV_convertASCII
5HV_getSunPrediction
6HV_heatingControl
7HV_loop
8HV_readOperationState
9HV_readTemperatures
10HV_restart
11HV_serviceLog
12HV_setActuators
13HV_setParameters
14HV_showHouse
15HV_showLog
16HV_showRawValues
17HV_showWeatherForecast
18HV_thermos200
19HV_ventProg
20HV_writeLog
21index
22MoistAir
23readFilenames
24readNamedData
25tableInterpol

 

gnuplot

gnuplot is used to visualise the results - via script you can do infinite diagrams in 1 second.
Run 'test' in gnuplot to get an owerview of the available line- and symbolstyles.

Login
Valid HTML 4.01!