<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Clima Archives &#8212; Santiago</title>
	<atom:link href="https://santiagoacevedo.com.br/tag/clima/feed/" rel="self" type="application/rss+xml" />
	<link>https://santiagoacevedo.com.br/tag/clima/</link>
	<description>Blog</description>
	<lastBuildDate>Thu, 01 Feb 2024 20:09:11 +0000</lastBuildDate>
	<language>pt-BR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
<site xmlns="com-wordpress:feed-additions:1">193839064</site>	<item>
		<title>Calcular sensação térmica e Índice de Calor com PHP</title>
		<link>https://santiagoacevedo.com.br/2021/05/30/calcular-sensacao-termica-e-indice-de-calor-com-php/</link>
					<comments>https://santiagoacevedo.com.br/2021/05/30/calcular-sensacao-termica-e-indice-de-calor-com-php/#respond</comments>
		
		<dc:creator><![CDATA[Santiago]]></dc:creator>
		<pubDate>Sun, 30 May 2021 21:25:54 +0000</pubDate>
				<category><![CDATA[Script]]></category>
		<category><![CDATA[Clima]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[temperatura]]></category>
		<guid isPermaLink="false">https://santiagoacevedo.com.br/?p=359</guid>

					<description><![CDATA[<p>Sensação térmica ou wind chill, em inglês, é a temperatura aparente sentida pela pele exposta, em virtude da combinação entre temperatura do ar e velocidade...</p>
<p>The post <a href="https://santiagoacevedo.com.br/2021/05/30/calcular-sensacao-termica-e-indice-de-calor-com-php/">Calcular sensação térmica e Índice de Calor com PHP</a> appeared first on <a href="https://santiagoacevedo.com.br">Santiago</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Sensação térmica ou wind chill, em inglês, é a temperatura aparente sentida pela pele exposta, em virtude da combinação entre temperatura do ar e velocidade do vento.</p>
<p>Para calcular precisamos de dois dados a temperatura e a velocidade do vento.</p>
<p>Função em PHP:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="php" data-enlighter-theme="godzilla">function calSensacaoTermica($temperatura,$vel_vento){
    $vel_vento = $vel_vento / 3.6;
    $sensação = 33 + (10 * sqrt($vel_vento) + 10.45 - $vel_vento) * ($temperatura - 33) / 22;
    return round($sensação);
}
#Exemplo
echo calSensacaoTermica(28,15);

</pre>
<p>Calcular Índice de Calor</p>
<pre class="EnlighterJSRAW" data-enlighter-language="php" data-enlighter-theme="godzilla">&lt;?php
function calIndCalor($temp, $umR){
    $tempF = (($temp * 1.8) + 32);
    if ($umR &gt; 100) {
        return ("A umidade relativa não pode ser superior a 100%.");
        exit;
    }else if ($umR &lt; 0) {
        return ("A umidade relativa não pode ser menor do que 0%.");
        exit;
    }else if (floatval($tempF) &lt;= 32) {
        $HI = $tempF;
    }else {
        $HI = 0.5 * ($tempF + 61.0 + (($tempF - 68.0) * 1.2) + ($umR * 0.094));
        if ($HI &gt; 79) {
            $HI = -42.379 + 2.04901523 * $tempF + 10.14333127 * $umR - 0.22475541 * $tempF * $umR - 0.00683783 * $tempF * $tempF - 0.05481717 * $umR * $umR + 0.00122874 * $tempF * $tempF * $umR + 0.00085282 * $tempF * $umR * $umR - 0.00000199 * $tempF * $tempF * $umR * $umR;
            if (($umR &lt;= 13) &amp;&amp; (($tempF &gt;= 80) &amp;&amp; $tempF &lt;= 112)) {
                $HI -= ((13 - $umR) / 4) * sqrt((17 - abs($tempF - 95.)) / 17);
            }
            if (($umR &gt; 85) &amp;&amp; (($tempF &gt;= 80) &amp;&amp; $tempF &lt;= 87)) {
                $HI += (($umR - 85) / 10) * ((87 - $tempF) / 5);
            }
        }
    }
    $resultado = ($HI - 32) / 1.8;
    return round($resultado);
}

# Exemplo
echo calIndCalor('20','47')
?&gt;</pre>
<p>Fonte &#8211; <a href="https://ciram.epagri.sc.gov.br/index.php/indice-de-calor-e-sensacao-termica">https://ciram.epagri.sc.gov.br/index.php/indice-de-calor-e-sensacao-termica</a>/</p>
<p>The post <a href="https://santiagoacevedo.com.br/2021/05/30/calcular-sensacao-termica-e-indice-de-calor-com-php/">Calcular sensação térmica e Índice de Calor com PHP</a> appeared first on <a href="https://santiagoacevedo.com.br">Santiago</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://santiagoacevedo.com.br/2021/05/30/calcular-sensacao-termica-e-indice-de-calor-com-php/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">359</post-id>	</item>
		<item>
		<title>API Openweathermap com PHP</title>
		<link>https://santiagoacevedo.com.br/2021/05/30/api-openweathermap-com-php/</link>
					<comments>https://santiagoacevedo.com.br/2021/05/30/api-openweathermap-com-php/#respond</comments>
		
		<dc:creator><![CDATA[Santiago]]></dc:creator>
		<pubDate>Sun, 30 May 2021 10:27:42 +0000</pubDate>
				<category><![CDATA[Script]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[Clima]]></category>
		<category><![CDATA[php]]></category>
		<guid isPermaLink="false">http://santiago.ovh/wordprees/?p=349</guid>

					<description><![CDATA[<p>A openweathermap.org fornece uma API de dados meteorológicos de forma gratuita, sendo perfeita para rodar projetos básicos. Inicialmente é necessário criar sua conta em https://openweathermap.org,...</p>
<p>The post <a href="https://santiagoacevedo.com.br/2021/05/30/api-openweathermap-com-php/">API Openweathermap com PHP</a> appeared first on <a href="https://santiagoacevedo.com.br">Santiago</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>A openweathermap.org fornece uma API de dados meteorológicos de forma gratuita, sendo perfeita para rodar projetos básicos.</p>
<p>Inicialmente é necessário criar sua conta em <a href="https://openweathermap.org">https://openweathermap.org</a>, assim recebe uma chave para realizar as consultas via API.</p>
<p>Vamos realizar uma simples consulta sobre temperatura e outros dados uma cidade</p>
<pre class="EnlighterJSRAW" data-enlighter-language="php">&lt;?php
$dados = file_get_contents('api.openweathermap.org/data/2.5/weather?q={sua_cidade}&amp;appid={CHAVE_API}');
print_r($dados)
?&gt;</pre>
<p>Teremos como retorno dados em json, para facilitar a leitura utilize a formatação <a href="http://jsonviewer.stack.hu/">http://jsonviewer.stack.hu/</a></p>
<pre class="EnlighterJSRAW" data-enlighter-language="json">{
  "coord": {
    "lon": -54.2,
    "lat": -31.8667
  },
  "weather": [
    {
      "id": 802,
      "main": "Clouds",
      "description": "nuvens dispersas",
      "icon": "03d"
    }
  ],
  "base": "stations",
  "main": {
    "temp": -1.02,
    "feels_like": -3.63,
    "temp_min": -1.02,
    "temp_max": -1.02,
    "pressure": 1022,
    "humidity": 72,
    "sea_level": 1022,
    "grnd_level": 999
  },
  "visibility": 10000,
  "wind": {
    "speed": 1.99,
    "deg": 255,
    "gust": 2.24
  },
  "clouds": {
    "all": 29
  },
  "dt": 1622370699,
  "sys": {
    "type": 1,
    "id": 8312,
    "country": "UY",
    "sunrise": 1622370472,
    "sunset": 1622407274
  },
  "timezone": -10800,
  "id": 3443952,
  "name": "Acegua",
  "cod": 200
}</pre>
<p>Agora vamos trabalhar com as informações:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="php">&lt;?php
#coleta os dados da api
$dados = file_get_contents('api.openweathermap.org/data/2.5/weather?q={sua_cidade}&amp;appid={CHAVE_API}');
# o retorno e feito em json
$dados = json_decode($dados, true);

#agora podemos mostrar as infos.
echo 'Temperatura: '.$dados['main']['temp'];
echo 'Umidade: '.$dados['main']['humidity'];
echo 'Velocidade do Vento'. $dados['wind']['speed'];
?&gt;</pre>
<p>Lembrando que no plano gratuito, voce terá um limite de consultas diárias, para evitar problemas podemos criar um cache com duração de 30 minutos ou 1 hora.</p>
<p>The post <a href="https://santiagoacevedo.com.br/2021/05/30/api-openweathermap-com-php/">API Openweathermap com PHP</a> appeared first on <a href="https://santiagoacevedo.com.br">Santiago</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://santiagoacevedo.com.br/2021/05/30/api-openweathermap-com-php/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">349</post-id>	</item>
		<item>
		<title>Estação Meteorológica em Arduino (Telegram Bot)</title>
		<link>https://santiagoacevedo.com.br/2021/05/30/projeto-estacao-meteorologica-em-arduino/</link>
					<comments>https://santiagoacevedo.com.br/2021/05/30/projeto-estacao-meteorologica-em-arduino/#respond</comments>
		
		<dc:creator><![CDATA[Santiago]]></dc:creator>
		<pubDate>Sun, 30 May 2021 10:16:24 +0000</pubDate>
				<category><![CDATA[Projetos]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[bot]]></category>
		<category><![CDATA[Clima]]></category>
		<category><![CDATA[telegram]]></category>
		<guid isPermaLink="false">http://santiago.ovh/wordprees/?p=343</guid>

					<description><![CDATA[<p>Estação meteorológica baseada em Arduino. Componentes utilizados : ESP8266 2x Uno R3 &#8211; Como Slave BMP 180 DHT 22 Pluviômetro (Tipo Balança) Biruta Anemômetro Painel...</p>
<p>The post <a href="https://santiagoacevedo.com.br/2021/05/30/projeto-estacao-meteorologica-em-arduino/">Estação Meteorológica em Arduino (Telegram Bot)</a> appeared first on <a href="https://santiagoacevedo.com.br">Santiago</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Estação meteorológica baseada em Arduino.</p>
<p>Componentes utilizados :</p>
<ul>
<li>ESP8266</li>
<li>2x Uno R3 &#8211; Como Slave</li>
<li>BMP 180</li>
<li>DHT 22</li>
<li>Pluviômetro (Tipo Balança)</li>
<li>Biruta</li>
<li>Anemômetro</li>
<li>Painel Solar 10w + Controlador de Carga + Modulo Step Down + Bateria 75Ah.</li>
</ul>
<p>Os dados são enviados para um servidor particular que armazena todas as informações, possibilitando uma consulta específica de dia e hora. <a href="https://clima.santiago.ovh/" target="_blank" rel="noopener">https://clima.santiago.ovh/</a></p>
<p>O servidor recebe os dados via POST e insere no banco de dados.</p>
<p>Compartilhando dados também com <a href="https://thingspeak.com/channels/1293177" rel="nofollow">Thingspeak</a>,  <a href="https://www.wunderground.com/dashboard/pws/IMELO3" target="_blank" rel="noopener">Weather Underground</a></p>
<p>Info em JSON, tempo real (<a href="https://clima.santiago.ovh/api/log.json" rel="nofollow">https://clima.santiago.ovh/api/log.json</a>)</p>
<p>Melhoria futuras:</p>
<ul>
<li>Sensor para medir Qualidade do Ar</li>
<li>Sensor UV</li>
<li>Sensor Umidade do Solo</li>
<li>Redução do consumo de energia (Produção solar no inverno mais baixa)</li>
</ul>
<p>Códigos do projeto disponíveis no <a href="https://github.com/SantiagoAcevedo/estacao_meteorol-gica" target="_blank" rel="noopener">GitHub</a> <i class="epcl-shortcode epcl-icon fa fa-github" style="font-size: 16;color: black;"></i>
<h3><strong>Telegram Bot</strong></h3>
<p>Informações também disponíveis pelo bot do Telegram (Disponível no <a href="https://t.me/El_Campito_bot" target="_blank" rel="noopener">link</a>)</p>
<div class="epcl-gallery"><ul class="columns-3 grid-container grid-parent np-tablet np-mobile">
                        <li class="grid-33 tablet-grid-33 mobile-grid-50">
                           <div class="wrapper">
                               <a href="https://santiagoacevedo.com.br/wp-content/uploads/2021/05/Screenshot_20210531-080406_Telegram.jpg" class="full-image mfp-image hover-effect" title=""><span class="img cover" style="background: url(https://i0.wp.com/santiagoacevedo.com.br/wp-content/uploads/2021/05/Screenshot_20210531-080406_Telegram.jpg?fit=146%2C300&ssl=1);"></span></a>
                           </div>
                        </li>
                        <li class="grid-33 tablet-grid-33 mobile-grid-50">
                           <div class="wrapper">
                               <a href="https://santiagoacevedo.com.br/wp-content/uploads/2021/05/Screenshot_20210531-080440_Telegram.jpg" class="full-image mfp-image hover-effect" title=""><span class="img cover" style="background: url(https://i0.wp.com/santiagoacevedo.com.br/wp-content/uploads/2021/05/Screenshot_20210531-080440_Telegram.jpg?fit=146%2C300&ssl=1);"></span></a>
                           </div>
                        </li></ul><div class="clear"></div></div>
<h3><a id="user-content-feito-com" class="anchor" href="https://github.com/SantiagoAcevedo/estacao_meteorol-gica#feito-com" aria-hidden="true"></a>Feito com:</h3>
<ul>
<li><a href="https://getbootstrap.com/" rel="nofollow">Bootstrap</a></li>
<li><a href="https://jquery.com/" rel="nofollow">JQuery</a></li>
<li><a href="https://github.com/thomaspark/bootswatch/">bootswatch</a></li>
<li><a href="https://www.highcharts.com/" rel="nofollow">highcharts</a></li>
<li>PHP</li>
<li><a href="https://www.vultr.com/?ref=6822225" rel="nofollow">Servidor by Vultr</a></li>
</ul>
<p>The post <a href="https://santiagoacevedo.com.br/2021/05/30/projeto-estacao-meteorologica-em-arduino/">Estação Meteorológica em Arduino (Telegram Bot)</a> appeared first on <a href="https://santiagoacevedo.com.br">Santiago</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://santiagoacevedo.com.br/2021/05/30/projeto-estacao-meteorologica-em-arduino/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">343</post-id>	</item>
	</channel>
</rss>
