{"product_id":"tzt-1lot-infrared-ir-wireless-remote-control-module-kits-diy-kit-hx1838-for-arduino-raspberry-pi","title":"TZT 1套红外线IR无线遥控模块套件 DIY套件 HX1838 适用于 Arduino 树莓派","description":"\u003ch1\u003e规格\u003c\/h1\u003e\u003cp\u003e\u003cspan\u003e品牌名称\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003eTZT\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003e型号\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003e红外无线遥控模块套件\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003e产地\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003e中国大陆\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003e高度关注化学品\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003e无\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003e状况\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003e全新\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003e类型\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003e稳压器\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003e供电电压\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003e..\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003e耗散功率\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003e..\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003e是否定制\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003e是\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003e工作温度\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003e-40-+85\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003e应用\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003e计算机\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003e封装\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003eDIY套件\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003e功能\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003e电子模块\u003c\/span\u003e\u003c\/p\u003e\u003cp\u003e\u003cspan\u003e应用范围\u003c\/span\u003e: \u003cspan style=\"color:#333\"\u003e适用于Arduino STM的开关和传感器\u003c\/span\u003e\u003c\/p\u003e\u003cdiv class=\"detailmodule_image\"\u003e\n\u003cimg src=\"https:\/\/ae01.alicdn.com\/kf\/Sf205c261beb44f3bb3d00313fe38ea08K.gif\" class=\"detail-desc-decorate-image\"\u003e\u003cimg src=\"https:\/\/ae01.alicdn.com\/kf\/Hc0239a5ea42c4883aae8dbea5618c8873.jpg\" class=\"detail-desc-decorate-image\"\u003e\n\u003c\/div\u003e\n\u003cdiv class=\"detailmodule_html\"\u003e\u003cdiv class=\"detail-desc-decorate-richtext\"\u003e\n\u003ch1 style=\"color:#00b0f0;font-family:verdana , arial , helvetica , sans-serif;font-size:3.0em;font-weight:400;line-height:1;margin:0.0px 0.0px 0.5em;\"\u003e\u003cspan style=\"font-family:comic sans ms;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"font-size:24.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003e热销新款红外无线遥控模块套件，适用于Arduino批发\u003c\/span\u003e\u003c\/span\u003e\u003c\/h1\u003e\n\u003cp dir=\"ltr\"\u003e\u003c\/p\u003e\n\u003ch1 style=\"color:#00B0F0;font-family:verdana, arial, helvetica, sans-serif;font-size:3em;font-weight:400;line-height:1;margin:0px 0px 0.5em;\"\u003e\u003cspan style=\"color:#FF0000;\"\u003e\u003cstrong\u003e\u003cspan style=\"font-size:28px;\"\u003e遥控器不含电池\u003c\/span\u003e\u003c\/strong\u003e\u003c\/span\u003e\u003c\/h1\u003e\n\u003cp\u003e\u003cspan style=\"font-family:comic sans ms;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"font-size:24.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003e\u003cimg src=\"http:\/\/ae01.alicdn.com\/kf\/H56075f7cec0242268278ee09d55c08d7D.jpg\" title=\"详图.jpg\" data-src=\"http:\/\/ae01.alicdn.com\/kf\/H56075f7cec0242268278ee09d55c08d7D.jpg\"\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp style=\"color:#ff0000;font-family:verdana , arial , helvetica , sans-serif;font-size:13.0px;line-height:14.0px;margin:0.0px;\"\u003e\u003cspan style=\"font-size:22.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"font-size:inherit;font-style:inherit;font-weight:700;line-height:inherit;margin:0.0px;\"\u003e特点：\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cdiv style=\"color:#000000;font-family:verdana , arial , helvetica , sans-serif;font-size:16.0px;line-height:inherit;margin:0.0px;\"\u003e最新红外无线遥控套件包括迷你超薄38KHz红外遥控器和红外接收模块，迷你超薄红外遥控器有17个功能键，发射距离可达8米，适用于控制室的各种设备。红外接收模块可接收标准的38KHz调制遥控信号，通过编程，可实现遥控信号解码操作，从而制作各种遥控机器人和交互作品。\u003c\/div\u003e\n\u003cdiv style=\"color:#000000;font-family:arial , helvetica;font-size:13.0px;line-height:inherit;margin:0.0px;\"\u003e\n\u003cdiv style=\"color:#ff0000;margin:0.0px;\"\u003e \u003c\/div\u003e\n\u003cdiv style=\"color:#ff0000;margin:0.0px;\"\u003e\n\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"font-size:24.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003e超薄红外遥控产品参数：\u003c\/span\u003e\u003c\/span\u003e \u003c\/div\u003e\n\u003cdiv style=\"font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003e\n\u003cul class=\"list-paddingleft-2\"\u003e\n\u003cli\u003e \u003c\/li\u003e\n\u003cli\u003e \u003c\/li\u003e\n\u003cli\u003e \u003c\/li\u003e\n\u003cli\u003e\u003cspan style=\"font-size:22.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003e1 传输距离：8米以上（具体取决于环境、接收灵敏度等因素）\u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e \u003c\/li\u003e\n\u003cli\u003e \u003c\/li\u003e\n\u003cli\u003e \u003c\/li\u003e\n\u003cli\u003e\u003cspan style=\"font-size:22.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003e2 有效角度：60度\u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e \u003c\/li\u003e\n\u003cli\u003e \u003c\/li\u003e\n\u003cli\u003e \u003c\/li\u003e\n\u003cli\u003e\u003cspan style=\"font-size:22.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003e3 粘贴材料：0.125mmPET，有效寿命20000次。\u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e \u003c\/li\u003e\n\u003cli\u003e \u003c\/li\u003e\n\u003cli\u003e \u003c\/li\u003e\n\u003cli\u003e\u003cspan style=\"font-size:22.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003e4. 质量稳定，性价比高\u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e \u003c\/li\u003e\n\u003cli\u003e \u003c\/li\u003e\n\u003cli\u003e \u003c\/li\u003e\n\u003cli\u003e\u003cspan style=\"font-size:22.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003e5 静态电流3-5uA，动态电流3-5mA。\u003c\/span\u003e\u003c\/li\u003e\n\u003cli\u003e \u003c\/li\u003e\n\u003cli\u003e \u003c\/li\u003e\n\u003cli\u003e \u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp style=\"color:#ff0000;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:14.0px;margin:0.0px;\"\u003e \u003c\/p\u003e\n\u003cdiv style=\"font-family:arial;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:23.0px;margin:0.0px;\"\u003e\n\u003cp style=\"font-family:arial , helvetica;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003e \u003c\/p\u003e\n\u003cp style=\"color:#333333;margin:0.0px;\"\u003e\u003cspan style=\"font-size:18.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003e#include \u0026lt;IRremote.h\u0026gt;\u003c\/span\u003e\u003c\/p\u003e\n\u003cp style=\"color:#333333;margin:0.0px;\"\u003e\u003cspan style=\"font-size:18.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003eint RECV_PIN = 11;\u003c\/span\u003e\u003c\/p\u003e\n\u003cp style=\"color:#333333;margin:0.0px;\"\u003e\u003cspan style=\"font-size:18.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003eIRrecv irrecv(RECV_PIN);\u003c\/span\u003e\u003c\/p\u003e\n\u003cp style=\"color:#333333;margin:0.0px;\"\u003e\u003cspan style=\"font-size:18.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003edecode_results results;\u003c\/span\u003e\u003c\/p\u003e\n\u003cp style=\"color:#333333;margin:0.0px;\"\u003e\u003cspan style=\"font-size:18.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003evoid setup()\u003c\/span\u003e\u003cbr\u003e\u003cspan style=\"font-size:18.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003e{\u003c\/span\u003e\u003cbr\u003e\u003cspan style=\"font-size:18.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003e  Serial.begin(9600);\u003c\/span\u003e\u003cbr\u003e\u003cspan style=\"font-size:18.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003e  irrecv.enableIRIn(); \/\/ 启动接收器\u003c\/span\u003e\u003cbr\u003e\u003cspan style=\"font-size:18.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003e}\u003c\/span\u003e\u003c\/p\u003e\n\u003cp style=\"color:#333333;margin:0.0px;\"\u003e\u003cspan style=\"font-size:18.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003evoid loop() {\u003c\/span\u003e\u003cbr\u003e\u003cspan style=\"font-size:18.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003e  if (irrecv.decode(\u0026amp;results)) {\u003c\/span\u003e\u003cbr\u003e\u003cspan style=\"font-size:18.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003e    Serial.println(results.value, HEX);\u003c\/span\u003e\u003cbr\u003e\u003cspan style=\"font-size:18.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003e    irrecv.resume(); \/\/ 接收下一个值\u003c\/span\u003e\u003cbr\u003e\u003cspan style=\"font-size:18.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003e  }\u003c\/span\u003e\u003cbr\u003e\u003cspan style=\"font-size:18.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003e}\u003c\/span\u003e\u003c\/p\u003e\n\u003cp style=\"margin:0.0px;\"\u003e \u003c\/p\u003e\n\u003ch2 style=\"font-size:2.0em;font-style:inherit;font-weight:400;line-height:1;margin:9.0pt 0.0pt;padding:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e步骤1：组装电路\u003c\/span\u003e\u003c\/span\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e：\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/h2\u003e\n\u003ch2 style=\"font-size:2.0em;font-style:inherit;font-weight:400;line-height:1;margin:9.0pt 0.0pt;padding:0.0pt;\"\u003e \u003c\/h2\u003e\n\u003cp style=\"margin:0.0px;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e\u003cimg alt=\"aeProduct.getSubject()\" src=\"http:\/\/ae01.alicdn.com\/kf\/H8e7dac5906d343159d63b5123ee63349T.jpg\" style=\"color:transparent;font-size:0.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;vertical-align:middle;width:auto;\" width=\"800\" data-src=\"http:\/\/ae01.alicdn.com\/kf\/H8e7dac5906d343159d63b5123ee63349T.jpg\"\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp style=\"margin:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"color:#333333;font-size:12.0pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003e您将需要一个Arduino来完成此操作。我使用了一个UNO，但几乎任何Arduino都可以工作。首先连接套件中附带的红外接收器。有3根线，PWR、GND和SIG，我将端口11用于SIG。注意！一些读者报告他们的传感器接线不同，请自行仔细检查。\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp style=\"margin:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"color:#333333;font-size:12.5pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"font-family:calibri;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003e \u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003ch2 style=\"font-size:2.0em;font-style:inherit;font-weight:400;line-height:1;margin:9.0pt 0.0pt;padding:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e步骤2：下载红外库\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/h2\u003e\n\u003ch2 style=\"font-size:2.0em;font-style:inherit;font-weight:400;line-height:1;margin:0.0px 0.0px 0.75em;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cimg alt=\"aeProduct.getSubject()\" src=\"http:\/\/ae01.alicdn.com\/kf\/He2799789232a49cfaebb8644e18699d7k.jpg\" style=\"color:transparent;font-size:0.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;vertical-align:middle;width:auto;\" width=\"634\" data-src=\"http:\/\/ae01.alicdn.com\/kf\/He2799789232a49cfaebb8644e18699d7k.jpg\"\u003e\u003c\/span\u003e\u003c\/h2\u003e\n\u003ch2 style=\"font-size:2.0em;font-style:inherit;font-weight:400;line-height:1;margin:0.0px 0.0px 0.75em;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cimg alt=\"aeProduct.getSubject()\" src=\"http:\/\/ae01.alicdn.com\/kf\/H3b3cce1af9b6441692a96fed92fa8e10N.jpg\" style=\"color:transparent;font-size:0.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;vertical-align:middle;width:auto;\" width=\"450\" data-src=\"http:\/\/ae01.alicdn.com\/kf\/H3b3cce1af9b6441692a96fed92fa8e10N.jpg\"\u003e\u003c\/span\u003e\u003c\/h2\u003e\n\u003ch2 style=\"font-size:2.0em;font-style:inherit;font-weight:400;line-height:1;margin:9.0pt 0.0pt;padding:0.0pt;\"\u003e \u003c\/h2\u003e\n\u003cp style=\"font-size:inherit;font-style:inherit;font-weight:inherit;line-height:18.0pt;margin:15.0pt;padding:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"color:#333333;font-size:12.0pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003e为了对遥控器进行逆向工程并获取每个按钮的代码，我们需要下载并安装以下库。\u003c\/span\u003e\u003cbr\u003e\u003cbr\u003e\u003cspan style=\"margin:0.0px;\"\u003e\u003ca\u003e\u003cspan style=\"color:#e86c00;font-size:12.5pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"font-family:times new roman;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003ehttp:\/\/github.com\/shirriff\/Arduino-IRremote \u003c\/span\u003e\u003c\/span\u003e\u003c\/a\u003e\u003c\/span\u003e\u003cbr\u003e\u003cbr\u003e\u003cspan style=\"color:#333333;font-size:12.0pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003e将文件解压到您的库目录。例如 ( C:\\electronics\\arduino-1.0.5\\libraries )\u003c\/span\u003e\u003cbr\u003e\u003cspan style=\"color:#333333;font-size:12.0pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003e注意：我不得不重命名该库，因为名称太长，我将其重命名为IR。\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003ch2 style=\"font-size:2.0em;font-style:inherit;font-weight:400;line-height:1;margin:9.0pt 0.0pt;padding:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e步骤3：将库添加到草图中\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/h2\u003e\n\u003ch2 style=\"font-size:2.0em;font-style:inherit;font-weight:400;line-height:1;margin:9.0pt 0.0pt;padding:0.0pt;\"\u003e \u003c\/h2\u003e\n\u003ch2 style=\"font-size:2.0em;font-style:inherit;font-weight:400;line-height:1;margin:9.0pt 0.0pt;padding:0.0pt;\"\u003e \u003c\/h2\u003e\n\u003cp style=\"margin:0.0px;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e\u003cimg alt=\"aeProduct.getSubject()\" src=\"http:\/\/ae01.alicdn.com\/kf\/Hf84540ad6c0945e2ad6d8bfac8be37750.jpg\" style=\"color:transparent;font-size:0.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;vertical-align:middle;width:auto;\" width=\"620\" data-src=\"http:\/\/ae01.alicdn.com\/kf\/Hf84540ad6c0945e2ad6d8bfac8be37750.jpg\"\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp style=\"font-size:inherit;font-style:inherit;font-weight:inherit;line-height:18.0pt;margin:15.0pt;padding:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"color:#333333;font-size:12.0pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003e现在IR文件夹（或您命名的任何名称）已在您的库目录中，我们可以将其导入到新草图中。\u003c\/span\u003e\u003cbr\u003e\u003cbr\u003e\u003cspan style=\"color:#333333;font-size:12.0pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003e启动一个新草图，然后单击 \u003c\/span\u003e\u003cbr\u003e\u003cbr\u003e\u003cspan style=\"color:#333333;font-size:12.0pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003e 草图-\u003e导入库-\u003eIR。\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003ch2 style=\"font-size:2.0em;font-style:inherit;font-weight:400;line-height:1;margin:9.0pt 0.0pt;padding:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e步骤4：粘贴代码并编译\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/h2\u003e\n\u003ch2 style=\"font-size:2.0em;font-style:inherit;font-weight:400;line-height:1;margin:9.0pt 0.0pt;padding:0.0pt;\"\u003e \u003c\/h2\u003e\n\u003cp style=\"font-size:inherit;font-style:inherit;font-weight:inherit;line-height:18.0pt;margin:15.0pt;padding:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"color:#333333;font-size:12.0pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003e将以下代码粘贴到新草图中。然后验证它是否编译。\u003c\/span\u003e\u003cbr\u003e\u003cbr\u003e\u003cspan style=\"color:#333333;font-size:10.0pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003e#include \u0026lt;IRemote.h\u0026gt;\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp style=\"font-size:inherit;font-style:inherit;font-weight:inherit;line-height:18.0pt;margin:15.0pt;padding:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"color:#333333;font-size:10.0pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003eint RECV_PIN = 11;\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp style=\"font-size:inherit;font-style:inherit;font-weight:inherit;line-height:18.0pt;margin:15.0pt;padding:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"color:#333333;font-size:10.0pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003eIRrecv irrecv(RECV_PIN);\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp style=\"font-size:inherit;font-style:inherit;font-weight:inherit;line-height:18.0pt;margin:15.0pt;padding:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"color:#333333;font-size:10.0pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003edecode_results results;\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp style=\"font-size:inherit;font-style:inherit;font-weight:inherit;line-height:18.0pt;margin:15.0pt 15.0pt 15.0pt 0.0pt;padding:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"color:#333333;font-size:10.0pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003e \u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp style=\"font-size:inherit;font-style:inherit;font-weight:inherit;line-height:18.0pt;margin:15.0pt;padding:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"color:#333333;font-size:10.0pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003evoid setup()\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp style=\"font-size:inherit;font-style:inherit;font-weight:inherit;line-height:18.0pt;margin:15.0pt;padding:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"color:#333333;font-size:10.0pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003e{\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp style=\"font-size:inherit;font-style:inherit;font-weight:inherit;line-height:18.0pt;margin:15.0pt;padding:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"color:#333333;font-size:10.0pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003e  Serial.begin(9600);\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp style=\"font-size:inherit;font-style:inherit;font-weight:inherit;line-height:18.0pt;margin:15.0pt;padding:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"color:#333333;font-size:10.0pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003e  irrecv.enableIRIn(); \/\/ 启动接收器\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp style=\"font-size:inherit;font-style:inherit;font-weight:inherit;line-height:18.0pt;margin:15.0pt;padding:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"color:#333333;font-size:10.0pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003e}\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\u003cp style=\"font-size:inherit;font-style:inherit;font-weight:inherit;line-height:18.0pt;margin:15.0pt;padding:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"color:#333333;font-size:10.0pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003e \u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp style=\"font-size:inherit;font-style:inherit;font-weight:inherit;line-height:18.0pt;margin:15.0pt;padding:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"color:#333333;font-size:10.0pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003evoid loop()\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp style=\"font-size:inherit;font-style:inherit;font-weight:inherit;line-height:18.0pt;margin:15.0pt;padding:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"color:#333333;font-size:10.0pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003e{\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp style=\"font-size:inherit;font-style:inherit;font-weight:inherit;line-height:18.0pt;margin:15.0pt;padding:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"color:#333333;font-size:10.0pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003e  if (irrecv.decode(\u0026amp;results))\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp style=\"font-size:inherit;font-style:inherit;font-weight:inherit;line-height:18.0pt;margin:15.0pt;padding:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"color:#333333;font-size:10.0pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003e    {\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp style=\"font-size:inherit;font-style:inherit;font-weight:inherit;line-height:18.0pt;margin:15.0pt;padding:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"color:#333333;font-size:10.0pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003e     Serial.println(results.value, HEX);\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp style=\"font-size:inherit;font-style:inherit;font-weight:inherit;line-height:18.0pt;margin:15.0pt;padding:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"color:#333333;font-size:10.0pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003e     irrecv.resume(); \/\/ Receive the next value\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp style=\"font-size:inherit;font-style:inherit;font-weight:inherit;line-height:18.0pt;margin:15.0pt;padding:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"color:#333333;font-size:10.0pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003e    }\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp style=\"font-size:inherit;font-style:inherit;font-weight:inherit;line-height:18.0pt;margin:15.0pt;padding:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"color:#333333;font-size:10.0pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003e}\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003ch2 style=\"font-size:2.0em;font-style:inherit;font-weight:400;line-height:1;margin:9.0pt 0.0pt;padding:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e第 5 步：打开串口监视器\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/h2\u003e\n\u003ch2 style=\"font-size:2.0em;font-style:inherit;font-weight:400;line-height:1;margin:9.0pt 0.0pt;padding:0.0pt;\"\u003e \u003c\/h2\u003e\n\u003ch2 style=\"font-size:2.0em;font-style:inherit;font-weight:400;line-height:1;margin:9.0pt 0.0pt;padding:0.0pt;\"\u003e \u003c\/h2\u003e\n\u003cp style=\"margin:0.0px;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e\u003cimg alt=\"aeProduct.getSubject()\" src=\"http:\/\/ae01.alicdn.com\/kf\/H0c04c2196d3c424cb2c352f58ed40c81G.jpg\" style=\"color:transparent;font-size:0.0px;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;vertical-align:middle;width:auto;\" width=\"696\" data-src=\"http:\/\/ae01.alicdn.com\/kf\/H0c04c2196d3c424cb2c352f58ed40c81G.jpg\"\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp style=\"font-size:inherit;font-style:inherit;font-weight:inherit;line-height:18.0pt;margin:15.0pt;padding:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e\u003cspan style=\"color:#333333;font-size:12.0pt;font-weight:normal;line-height:inherit;margin:0.0px;\"\u003e使用 USB 端口将 Arduino 连接到计算机，然后上传草图。打开串口监视器，拿起遥控器并按下按钮。串口监视器上应显示一些十六进制代码。\u003c\/span\u003e\u003cbr\u003e\u003cspan style=\"font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e第 6 步：记录按钮代码\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003ch2 style=\"font-size:2.0em;font-style:inherit;font-weight:400;line-height:1;margin:9.0pt 0.0pt;padding:0.0pt;\"\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e  \u003c\/span\u003e\u003c\/span\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e第 7 步：适用于任何遥控器！\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/h2\u003e\n\u003cp\u003e\u003cspan style=\"color:#666666;margin:0.0px;\"\u003e\u003cspan style=\"font-weight:700;\"\u003e\u003cspan style=\"color:#ff0000;font-size:20.0pt;line-height:inherit;margin:0.0px;\"\u003e\u003cimg src=\"http:\/\/ae01.alicdn.com\/kf\/H4012982a08494b9a99d7f0590574e437Y.jpg\" title=\"副图4.jpg\" data-src=\"http:\/\/ae01.alicdn.com\/kf\/H4012982a08494b9a99d7f0590574e437Y.jpg\"\u003e\u003cimg src=\"http:\/\/ae01.alicdn.com\/kf\/Hfb22292f24144fdf85f737b8db355986R.jpg\" title=\"副图3.jpg\" data-src=\"http:\/\/ae01.alicdn.com\/kf\/Hfb22292f24144fdf85f737b8db355986R.jpg\"\u003e\u003cimg src=\"http:\/\/ae01.alicdn.com\/kf\/H9eaaddb21e6d4dd7a3c6b95e8ea74dceC.jpg\" title=\"副图2.jpg\" data-src=\"http:\/\/ae01.alicdn.com\/kf\/H9eaaddb21e6d4dd7a3c6b95e8ea74dceC.jpg\"\u003e\u003cimg src=\"http:\/\/ae01.alicdn.com\/kf\/H800d9d84f00a4f01b1c75ad1a3d59740G.jpg\" title=\"副图1.jpg\" data-src=\"http:\/\/ae01.alicdn.com\/kf\/H800d9d84f00a4f01b1c75ad1a3d59740G.jpg\"\u003e\u003cimg src=\"http:\/\/ae01.alicdn.com\/kf\/H28548d971fa94a9188e10aa77f25a764f.jpg\" title=\"副图6.jpg\" data-src=\"http:\/\/ae01.alicdn.com\/kf\/H28548d971fa94a9188e10aa77f25a764f.jpg\"\u003e\u003cimg src=\"http:\/\/ae01.alicdn.com\/kf\/Hf1b07e7955684bb9852f09f4a2153b65D.jpg\" title=\"副图5.jpg\" data-src=\"http:\/\/ae01.alicdn.com\/kf\/Hf1b07e7955684bb9852f09f4a2153b65D.jpg\"\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003c\/div\u003e\n\u003ch1 style=\"color:#00b0f0;font-family:verdana , arial , helvetica , sans-serif;font-size:3.0em;font-weight:400;line-height:1;margin:0.0px 0.0px 0.5em;\"\u003e \u003c\/h1\u003e\n\u003cdiv style=\"color:#000000;font-family:arial , helvetica;font-size:13.0px;line-height:inherit;margin:0.0px;\"\u003e\u003cdiv style=\"font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;margin:0.0px;\"\u003e\u003cdiv style=\"font-family:arial;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:23.0px;margin:0.0px;\"\u003e\u003cp\u003e \u003c\/p\u003e\u003c\/div\u003e\u003c\/div\u003e\u003c\/div\u003e\n\u003cp\u003e \u003c\/p\u003e\n\u003cp\u003e \u003c\/p\u003e\n\u003c\/div\u003e\u003c\/div\u003e","brand":"East Supplier Platform","offers":[{"title":"Default Title","offer_id":46454788227295,"sku":"32988392920-Default Title","price":1.66,"currency_code":"USD","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0503\/6412\/1244\/files\/Sbc97abc428fd47acbe4357363d1a9ec0s.webp?v=1731458103","url":"https:\/\/eastsupplier.cn\/zh-cn\/products\/tzt-1lot-infrared-ir-wireless-remote-control-module-kits-diy-kit-hx1838-for-arduino-raspberry-pi","provider":"EastSupplier Platform","version":"1.0","type":"link"}