#include <IRremote.h>
IRsend irsend;
void setup()
{
Serial.begin(9600);
}
void loop()
{
if (( ( Serial.parseInt() ) == ( 1 ) ))
irsend.sendNEC(0x234D22D, 32);
if (( ( Serial.parseInt() ) == ( 2 ) ))
irsend.sendNEC(0x234728D, 32);
if (( ( Serial.parseInt() ) == ( 3 ) ))
irsend.sendNEC(0x23432CD, 32);
if (( ( Serial.parseInt() ) == ( 4 ) ))
irsend.sendNEC(0x234B24D, 32);
if (( ( Serial.parseInt() ) == ( 5 ) ))
irsend.sendNEC(0x23438C7, 32);
}
用手机连接蓝牙模块控制红外发射管发射红外信号,不知道为什么红外信号时有时无?
IRsend irsend;
void setup()
{
Serial.begin(9600);
}
void loop()
{
if (( ( Serial.parseInt() ) == ( 1 ) ))
irsend.sendNEC(0x234D22D, 32);
if (( ( Serial.parseInt() ) == ( 2 ) ))
irsend.sendNEC(0x234728D, 32);
if (( ( Serial.parseInt() ) == ( 3 ) ))
irsend.sendNEC(0x23432CD, 32);
if (( ( Serial.parseInt() ) == ( 4 ) ))
irsend.sendNEC(0x234B24D, 32);
if (( ( Serial.parseInt() ) == ( 5 ) ))
irsend.sendNEC(0x23438C7, 32);
}
用手机连接蓝牙模块控制红外发射管发射红外信号,不知道为什么红外信号时有时无?