<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-CN">
		<id>http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=Temperature_control_air_conditioning</id>
		<title>Temperature control air conditioning - 版本历史</title>
		<link rel="self" type="application/atom+xml" href="http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=Temperature_control_air_conditioning"/>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Temperature_control_air_conditioning&amp;action=history"/>
		<updated>2026-06-06T04:59:13Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=Temperature_control_air_conditioning&amp;diff=10902&amp;oldid=prev</id>
		<title>1304410487@qq.com：Created page with &quot;{{Language| Temperature Control Type Air-conditioner}} {| style=&quot;width: 800px;&quot; |- | ==Objective== To control air conditioner by detecting environment temperature. When temper...&quot;</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Temperature_control_air_conditioning&amp;diff=10902&amp;oldid=prev"/>
				<updated>2015-10-21T05:54:49Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Language| Temperature Control Type Air-conditioner}} {| style=&amp;quot;width: 800px;&amp;quot; |- | ==Objective== To control air conditioner by detecting environment temperature. When temper...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Language| Temperature Control Type Air-conditioner}}&lt;br /&gt;
{| style=&amp;quot;width: 800px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
==Objective==&lt;br /&gt;
To control air conditioner by detecting environment temperature. When temperature increases to a certain value, the air conditioner will start. On the contrary, the air conditioner will close when the outside temperature decreases to a certain value. &lt;br /&gt;
&lt;br /&gt;
==Principle==&lt;br /&gt;
Use temperature and humidity sensor AM2321 to detect indoor temperature and then control the air conditioner by matching codes with infrared transmission sensor. &lt;br /&gt;
&lt;br /&gt;
==Equipment==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Module||Number||Function&lt;br /&gt;
|-&lt;br /&gt;
|[[Microduino-CoreUSB]]||1||Core board &lt;br /&gt;
|-&lt;br /&gt;
|[[Microduino-Sensorhub]]||1||Sensor pin board&lt;br /&gt;
|-&lt;br /&gt;
| [[Microduino-Temp&amp;amp;Hum]]||1||Temperature and humidity sensor &lt;br /&gt;
|-&lt;br /&gt;
| [[Microduino-IR transmitter]]||1||Infrared transmission sensor &lt;br /&gt;
|-&lt;br /&gt;
| [[Microduino-Converter]]||1|| Pin board &lt;br /&gt;
|}&lt;br /&gt;
 [[File:_temp_air.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
==Hardware Buildup==&lt;br /&gt;
*Setup 1: Stack CoreUSB and Sensorhub. &lt;br /&gt;
[[File:CoreUSB_Ble_Sensorhub.jpg|600px|center|thumb]]&lt;br /&gt;
*Setup 2：Connect Microduino-IR transmitter via pin board to D3 pin of Sensorhub and Microduino-Temp&amp;amp;Hum to IIC pin of Sensorhub. &lt;br /&gt;
[[file:Microduino-sensorhub_rule.JPG|thumb|800px|center]]&lt;br /&gt;
[[File:temp_ir_sensor.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
==Software Debugging==&lt;br /&gt;
*Air conditioner infrared remote control encoding definition. Here the conditioner adopts NEC encoding format.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
IRsend irsend;       //Infrared transmission &lt;br /&gt;
AM2321 am2321;       //Temperature and humidity sensor AM2321 &lt;br /&gt;
&lt;br /&gt;
#define POWER_ON 0xC1602680    //Air conditioner power on/off encoding &lt;br /&gt;
float temp = 0;        //Temperature value &lt;br /&gt;
unsigned long runTime = 0;   //Air conditioner power on/off time &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Detect the current temperature value every second. When the temperature is above 30℃, the air conditioner opens and when it is below 25℃, the air conditioner closes. The time interval between opening and closing is 180s for fear of frequent operation.  &lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
am2321.read();           //Acquire the current temperature value &lt;br /&gt;
temp = am2321.temperature/10.0;&lt;br /&gt;
if(millis()&amp;gt;runTime+180000)    //Above 180s time interval&lt;br /&gt;
{&lt;br /&gt;
  if(temp &amp;gt; 30)         //Higher than 30℃ and the air conditioner opens. &lt;br /&gt;
&lt;br /&gt;
  {&lt;br /&gt;
    irsend.sendNEC(0xC1602680,32);&lt;br /&gt;
    irsend.sendCode(0x00000000,16);&lt;br /&gt;
    runTime = millis();&lt;br /&gt;
  }&lt;br /&gt;
  else if(temp &amp;lt;25)     //Lower than 30℃ and the air conditioner closes.&lt;br /&gt;
  {&lt;br /&gt;
    irsend.sendNEC(0xC1602680,32);&lt;br /&gt;
    irsend.sendCode(0x00000000,16);&lt;br /&gt;
    runTime = millis();    &lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 delay(1000); &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Program==&lt;br /&gt;
[[https://github.com/Microduino/Microduino_Tutorials/tree/master/MCookie_Tutorial/MicroduinoAirConditioner MicroduinoAirConditioner]]&lt;br /&gt;
&lt;br /&gt;
==Result==&lt;br /&gt;
When the temperature is above 30℃, the air conditioner opens and when it is below 25℃, the air conditioner closes. By detecting temperature value to control other functions of the air conditioner. &lt;br /&gt;
&lt;br /&gt;
==Video==&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>1304410487@qq.com</name></author>	</entry>

	</feed>