# IRremoteESP8266: IRsend Class Reference

IRsend Class Reference

Class for sending all basic IR protocols. More...

`#include <IRsend.h>`

## Public Member Functions

| IRsend (uint16_t IRsendPin, bool inverted=false, bool use_modulation=true)
| Constructor for an IRsend object. More...
void | begin ()
| Enable the pin for output. More...
void | enableIROut (uint32_t freq, uint8_t duty=kDutyDefault)
| Set the output frequency modulation and duty cycle. More...
VIRTUAL void | _delayMicroseconds (uint32_t usec)
| An ESP8266 RTOS watch-dog timer friendly version of delayMicroseconds(). More...
VIRTUAL uint16_t | mark (uint16_t usec)
| Modulate the IR LED for the given period (usec) and at the duty cycle set. More...
VIRTUAL void | space (uint32_t usec)
| Turn the pin (LED) off for a given time. Sends an IR space for the specified number of microseconds. A space is no output, so the PWM output is disabled. More...
int8_t | calibrate (uint16_t hz=38000U)
| Calculate & set any offsets to account for execution times during sending. More...
void | sendRaw (const uint16_t buf[], const uint16_t len, const uint16_t hz)
| Send a raw IRremote message. More...
void | sendData (uint16_t onemark, uint32_t onespace, uint16_t zeromark, uint32_t zerospace, uint64_t data, uint16_t nbits, bool MSBfirst=true)
| Generic method for sending data that is common to most protocols. Will send leading or trailing 0's if the nbits is larger than the number of bits in data. More...
void | sendManchesterData (const uint16_t half_period, const uint64_t data, const uint16_t nbits, const bool MSBfirst=true, const bool GEThomas=true)
| Generic method for sending Manchester code data. Will send leading or trailing 0's if the nbits is larger than the number of bits in data. More...
void | sendManchester (const uint16_t headermark, const uint32_t headerspace, const uint16_t half_period, const uint16_t footermark, const uint32_t gap, const uint64_t data, const uint16_t nbits, const uint16_t frequency=38, const bool MSBfirst=true, const uint16_t repeat=kNoRepeat, const uint8_t dutycycle=kDutyDefault, const bool GEThomas=true)
| Generic method for sending Manchester code messages. Will send leading or trailing 0's if the nbits is larger than the number. More...
void | sendGeneric (const uint16_t headermark, const uint32_t headerspace, const uint16_t onemark, const uint32_t onespace, const uint16_t zeromark, const uint32_t zerospace, const uint16_t footermark, const uint32_t gap, const uint64_t data, const uint16_t nbits, const uint16_t frequency, const bool MSBfirst, const uint16_t repeat, const uint8_t dutycycle)
| Generic method for sending simple protocol messages. Will send leading or trailing 0's if the nbits is larger than the number of bits in data. More...
void | sendGeneric (const uint16_t headermark, const uint32_t headerspace, const uint16_t onemark, const uint32_t onespace, const uint16_t zeromark, const uint32_t zerospace, const uint16_t footermark, const uint32_t gap, const uint32_t mesgtime, const uint64_t data, const uint16_t nbits, const uint16_t frequency, const bool MSBfirst, const uint16_t repeat, const uint8_t dutycycle)
| Generic method for sending simple protocol messages. Will send leading or trailing 0's if the nbits is larger than the number of bits in data. More...
void | sendGeneric (const uint16_t headermark, const uint32_t headerspace, const uint16_t onemark, const uint32_t onespace, const uint16_t zeromark, const uint32_t zerospace, const uint16_t footermark, const uint32_t gap, const uint8_t *dataptr, const uint16_t nbytes, const uint16_t frequency, const bool MSBfirst, const uint16_t repeat, const uint8_t dutycycle)
| Generic method for sending simple protocol messages. More...
bool | send (const decode_type_t type, const uint64_t data, const uint16_t nbits, const uint16_t repeat=kNoRepeat)
| Send a simple (up to 64 bits) IR message of a given type. An unknown/unsupported type will send nothing. More...
bool | send (const decode_type_t type, const uint8_t *state, const uint16_t nbytes)
| Send a complex (>= 64 bits) IR message of a given type. An unknown/unsupported type will send nothing. More...
void | sendNEC (uint64_t data, uint16_t nbits=kNECBits, uint16_t repeat=kNoRepeat)
| Send a raw NEC(Renesas) formatted message. Status: STABLE / Known working. More...
uint32_t | encodeNEC (uint16_t address, uint16_t command)
| Calculate the raw NEC data based on address and command. Status: STABLE / Expected to work. More...
void | sendSony (const uint64_t data, const uint16_t nbits=kSony20Bits, const uint16_t repeat=kSonyMinRepeat)
| Send a standard Sony/SIRC(Serial Infra-Red Control) message. (40kHz) Status: STABLE / Known working. More...
void | sendSony38 (const uint64_t data, const uint16_t nbits=kSony20Bits, const uint16_t repeat=kSonyMinRepeat+1)
| Send an alternative 38kHz Sony/SIRC(Serial Infra-Red Control) message. Status: STABLE / Known working. More...
uint32_t | encodeSony (const uint16_t nbits, const uint16_t command, const uint16_t address, const uint16_t extended=0)
| Convert Sony/SIRC command, address, & extended bits into sendSony format. Status: STABLE / Should be working. More...
void | sendSherwood (uint64_t data, uint16_t nbits=kSherwoodBits, uint16_t repeat=kSherwoodMinRepeat)
| Send an IR command to a Sherwood device. Status: STABLE / Known working. More...
void | sendSAMSUNG (const uint64_t data, const uint16_t nbits=kSamsungBits, const uint16_t repeat=kNoRepeat)
| Send a 32-bit Samsung formatted message. Status: STABLE / Should be working. More...
uint32_t | encodeSAMSUNG (const uint8_t customer, const uint8_t command)
| Construct a raw Samsung message from the supplied customer(address) & command. Status: STABLE / Should be working. More...
void | sendSamsung36 (const uint64_t data, const uint16_t nbits=kSamsung36Bits, const uint16_t repeat=kNoRepeat)
| Send a Samsung 36-bit formatted message. Status: STABLE / Works on real devices. More...
void | sendSamsungAC (const unsigned char data[], const uint16_t nbytes=kSamsungAcStateLength, const uint16_t repeat=kSamsungAcDefaultRepeat)
| Send a Samsung A/C message. Status: Stable / Known working. More...
void | sendLG (uint64_t data, uint16_t nbits=kLgBits, uint16_t repeat=kNoRepeat)
| Send an LG formatted message. (LG) Status: Beta / Should be working. More...
void | sendLG2 (uint64_t data, uint16_t nbits=kLgBits, uint16_t repeat=kNoRepeat)
| Send an LG Variant-2 formatted message. (LG2) Status: Beta / Should be working. More...
uint32_t | encodeLG (uint16_t address, uint16_t command)
| Construct a raw 28-bit LG message code from the supplied address & command. Status: STABLE / Works. More...
uint32_t | encodeSharp (const uint16_t address, const uint16_t command, const uint16_t expansion=1, const uint16_t check=0, const bool MSBfirst=false)
| Encode a (raw) Sharp message from it's components. Status: STABLE / Works okay. More...
void | sendSharp (const uint16_t address, const uint16_t command, const uint16_t nbits=kSharpBits, const uint16_t repeat=kNoRepeat)
| Send a Sharp message Status: DEPRECATED / Previously working fine. More...
void | sendSharpRaw (const uint64_t data, const uint16_t nbits=kSharpBits, const uint16_t repeat=kNoRepeat)
| Send a (raw) Sharp message. More...
void | sendSharpAc (const unsigned char data[], const uint16_t nbytes=kSharpAcStateLength, const uint16_t repeat=kSharpAcDefaultRepeat)
| Send a Sharp A/C message. Status: Alpha / Untested. More...
void | sendJVC (uint64_t data, uint16_t nbits=kJvcBits, uint16_t repeat=kNoRepeat)
| Send a JVC formatted message. Status: STABLE / Working. More...
uint16_t | encodeJVC (uint8_t address, uint8_t command)
| Calculate the raw JVC data based on address and command. Status: STABLE / Works fine. More...
void | sendDenon (uint64_t data, uint16_t nbits=kDenonBits, uint16_t repeat=kNoRepeat)
| Send a Denon formatted message. Status: STABLE / Should be working. More...
uint64_t | encodeSanyoLC7461 (uint16_t address, uint8_t command)
| Construct a Sanyo LC7461 message. More...
void | sendSanyoLC7461 (const uint64_t data, const uint16_t nbits=kSanyoLC7461Bits, const uint16_t repeat=kNoRepeat)
| Send a Sanyo LC7461 message. Status: BETA / Probably works. More...
void | sendSanyoAc (const uint8_t *data, const uint16_t nbytes=kSanyoAcStateLength, const uint16_t repeat=kNoRepeat)
| Send a SanyoAc formatted message. Status: STABLE / Reported as working. More...
void | sendDISH (uint64_t data, uint16_t nbits=kDishBits, uint16_t repeat=kDishMinRepeat)
| Send a DISH NETWORK formatted message. Status: STABLE / Working. More...
void | sendPanasonic64 (const uint64_t data, const uint16_t nbits=kPanasonicBits, const uint16_t repeat=kNoRepeat)
| Send a Panasonic formatted message. Status: STABLE / Should be working. More...
void | sendPanasonic (const uint16_t address, const uint32_t data, const uint16_t nbits=kPanasonicBits, const uint16_t repeat=kNoRepeat)
| Send a Panasonic formatted message. Status: STABLE, but DEPRECATED. More...
uint64_t | encodePanasonic (const uint16_t manufacturer, const uint8_t device, const uint8_t subdevice, const uint8_t function)
| Calculate the raw Panasonic data based on device, subdevice, & function. Status: STABLE / Should be working. More...
void | sendRC5 (const uint64_t data, uint16_t nbits=kRC5XBits, const uint16_t repeat=kNoRepeat)
| Send a Philips RC-5/RC-5X packet. Status: RC-5 (stable), RC-5X (alpha) More...
uint16_t | encodeRC5 (const uint8_t address, const uint8_t command, const bool key_released=false)
| Encode a Philips RC-5 data message. Status: Beta / Should be working. More...
uint16_t | encodeRC5X (const uint8_t address, const uint8_t command, const bool key_released=false)
| Encode a Philips RC-5X data message. Status: Beta / Should be working. More...
uint64_t | toggleRC5 (const uint64_t data)
| Flip the toggle bit of a Philips RC-5/RC-5X data message. Used to indicate a change of remote button's state. Status: STABLE. More...
void | sendRC6 (const uint64_t data, const uint16_t nbits=kRC6Mode0Bits, const uint16_t repeat=kNoRepeat)
| Send a Philips RC-6 packet. Status: Stable. More...
uint64_t | encodeRC6 (const uint32_t address, const uint8_t command, const uint16_t mode=kRC6Mode0Bits)
| Encode a Philips RC-6 data message. Status: Beta / Should be working. More...
uint64_t | toggleRC6 (const uint64_t data, const uint16_t nbits=kRC6Mode0Bits)
| Flip the toggle bit of a Philips RC-6 data message. Used to indicate a change of remote button's state. Status: STABLE / Should work fine. More...
void | sendRCMM (uint64_t data, uint16_t nbits=kRCMMBits, uint16_t repeat=kNoRepeat)
| Send a Philips RC-MM packet. Status: STABLE / Should be working. More...
void | sendCOOLIX (uint64_t data, uint16_t nbits=kCoolixBits, uint16_t repeat=kCoolixDefaultRepeat)
| Send a Coolix message Status: STABLE / Confirmed Working. More...
void | sendWhynter (const uint64_t data, const uint16_t nbits=kWhynterBits, const uint16_t repeat=kNoRepeat)
| Send a Whynter message. Status: STABLE. More...
void | sendMirage (const unsigned char data[], const uint16_t nbytes=kMirageStateLength, const uint16_t repeat=kMirageMinRepeat)
| Send a Mirage formatted message. Status: STABLE / Reported as working. More...
void | sendMitsubishi (uint64_t data, uint16_t nbits=kMitsubishiBits, uint16_t repeat=kMitsubishiMinRepeat)
| Send the supplied Mitsubishi 16-bit message. Status: STABLE / Working. More...
void | sendMitsubishi136 (const unsigned char data[], const uint16_t nbytes=kMitsubishi136StateLength, const uint16_t repeat=kMitsubishi136MinRepeat)
| Send a Mitsubishi 136-bit A/C message. (MITSUBISHI136) Status: BETA / Probably working. Needs to be tested against a real device. More...
void | sendMitsubishi112 (const unsigned char data[], const uint16_t nbytes=kMitsubishi112StateLength, const uint16_t repeat=kMitsubishi112MinRepeat)
| Send a Mitsubishi 112-bit A/C formatted message. (MITSUBISHI112) Status: Stable / Reported as working. More...
void | sendMitsubishi2 (uint64_t data, uint16_t nbits=kMitsubishiBits, uint16_t repeat=kMitsubishiMinRepeat)
| Send a supplied second variant Mitsubishi 16-bit message. Status: BETA / Probably works. More...
void | sendMitsubishiAC (const unsigned char data[], const uint16_t nbytes=kMitsubishiACStateLength, const uint16_t repeat=kMitsubishiACMinRepeat)
| Send a Mitsubishi 144-bit A/C formatted message. (MITSUBISHI_AC) Status: STABLE / Working. More...
void | sendMitsubishiHeavy88 (const unsigned char data[], const uint16_t nbytes=kMitsubishiHeavy88StateLength, const uint16_t repeat=kMitsubishiHeavy88MinRepeat)
| Send a MitsubishiHeavy 88-bit A/C message. Status: BETA / Appears to be working. Needs testing against a real device. More...
void | sendMitsubishiHeavy152 (const unsigned char data[], const uint16_t nbytes=kMitsubishiHeavy152StateLength, const uint16_t repeat=kMitsubishiHeavy152MinRepeat)
| Send a MitsubishiHeavy 152-bit A/C message. Status: BETA / Appears to be working. Needs testing against a real device. More...
void | sendFujitsuAC (const unsigned char data[], const uint16_t nbytes, const uint16_t repeat=kFujitsuAcMinRepeat)
| Send a Fujitsu A/C formatted message. Status: STABLE / Known Good. More...
void | sendInax (const uint64_t data, const uint16_t nbits=kInaxBits, const uint16_t repeat=kInaxMinRepeat)
| Send a Inax Toilet formatted message. Status: STABLE / Working. More...
void | sendGC (uint16_t buf[], uint16_t len)
| Send a shortened GlobalCache (GC) IRdb/control tower formatted message. Status: STABLE / Known working. More...
void | sendKelvinator (const unsigned char data[], const uint16_t nbytes=kKelvinatorStateLength, const uint16_t repeat=kKelvinatorDefaultRepeat)
| Send a Kelvinator A/C message. Status: STABLE / Known working. More...
void | sendDaikin (const unsigned char data[], const uint16_t nbytes=kDaikinStateLength, const uint16_t repeat=kDaikinDefaultRepeat)
| Send a Daikin 280-bit A/C formatted message. Status: STABLE. More...
void | sendDaikin64 (const uint64_t data, const uint16_t nbits=kDaikin64Bits, const uint16_t repeat=kDaikin64DefaultRepeat)
| Send a Daikin64 (64-bit) A/C formatted message. Status: Beta / Probably Working. More...
void | sendDaikin128 (const unsigned char data[], const uint16_t nbytes=kDaikin128StateLength, const uint16_t repeat=kDaikin128DefaultRepeat)
| Send a Daikin128 (128-bit) A/C formatted message. Status: STABLE / Known Working. More...
void | sendDaikin152 (const unsigned char data[], const uint16_t nbytes=kDaikin152StateLength, const uint16_t repeat=kDaikin152DefaultRepeat)
| Send a Daikin152 (152-bit) A/C formatted message. Status: STABLE / Known Working. More...
void | sendDaikin160 (const unsigned char data[], const uint16_t nbytes=kDaikin160StateLength, const uint16_t repeat=kDaikin160DefaultRepeat)
| Send a Daikin160 (160-bit) A/C formatted message. Status: STABLE / Confirmed working. More...
void | sendDaikin176 (const unsigned char data[], const uint16_t nbytes=kDaikin176StateLength, const uint16_t repeat=kDaikin176DefaultRepeat)
| Send a Daikin176 (176-bit) A/C formatted message. Status: STABLE / Working on a real device. More...
void | sendDaikin2 (const unsigned char data[], const uint16_t nbytes=kDaikin2StateLength, const uint16_t repeat=kDaikin2DefaultRepeat)
| Send a Daikin2 (312-bit) A/C formatted message. Status: STABLE / Expected to work. More...
void | sendDaikin216 (const unsigned char data[], const uint16_t nbytes=kDaikin216StateLength, const uint16_t repeat=kDaikin216DefaultRepeat)
| Send a Daikin216 (216-bit) A/C formatted message. Status: Alpha / Untested on a real device. More...
void | sendAiwaRCT501 (uint64_t data, uint16_t nbits=kAiwaRcT501Bits, uint16_t repeat=kAiwaRcT501MinRepeats)
| Send an Aiwa RC T501 formatted message. Status: BETA / Should work. More...
void | sendGree (const uint64_t data, const uint16_t nbits=kGreeBits, const uint16_t repeat=kGreeDefaultRepeat)
| Send a Gree Heat Pump formatted message. Status: STABLE / Working. More...
void | sendGree (const uint8_t data[], const uint16_t nbytes=kGreeStateLength, const uint16_t repeat=kGreeDefaultRepeat)
| Send a Gree Heat Pump formatted message. Status: STABLE / Working. More...
void | sendGoodweather (const uint64_t data, const uint16_t nbits=kGoodweatherBits, const uint16_t repeat=kGoodweatherMinRepeat)
| Send a Goodweather HVAC formatted message. Status: BETA / Needs testing on real device. More...
void | sendPronto (uint16_t data[], uint16_t len, uint16_t repeat=kNoRepeat)
| Send a Pronto Code formatted message. Status: STABLE / Known working. More...
void | sendArgo (const unsigned char data[], const uint16_t nbytes=kArgoStateLength, const uint16_t repeat=kArgoDefaultRepeat)
| Send a Argo A/C formatted message. Status: BETA / Probably works. More...
void | sendTrotec (const unsigned char data[], const uint16_t nbytes=kTrotecStateLength, const uint16_t repeat=kTrotecDefaultRepeat)
| Send a Trotec message. Status: Beta / Probably Working. More...
void | sendNikai (uint64_t data, uint16_t nbits=kNikaiBits, uint16_t repeat=kNoRepeat)
| Send a Nikai formatted message. Status: STABLE / Working. More...
void | sendToshibaAC (const uint8_t data[], const uint16_t nbytes=kToshibaACStateLength, const uint16_t repeat=kToshibaACMinRepeat)
| Send a Toshiba A/C message. Status: STABLE / Working. More...
void | sendMidea (uint64_t data, uint16_t nbits=kMideaBits, uint16_t repeat=kMideaMinRepeat)
| Send a Midea message Status: Alpha / Needs testing against a real device. More...
void | sendMidea24 (const uint64_t data, const uint16_t nbits=kMidea24Bits, const uint16_t repeat=kMidea24MinRepeat)
| Send a Midea24 formatted message. Status: STABLE / Confirmed working on a real device. More...
void | sendMagiQuest (const uint64_t data, const uint16_t nbits=kMagiquestBits, const uint16_t repeat=kNoRepeat)
| Send a MagiQuest formatted message. Status: Beta / Should be working. More...
uint64_t | encodeMagiQuest (const uint32_t wand_id, const uint16_t magnitude)
| Encode a MagiQuest wand_id, and a magnitude into a single 64bit value. (Only 48 bits of real data + 8 leading zero bits) This is suitable for calling sendMagiQuest() with. e.g. sendMagiQuest(encodeMagiQuest(wand_id, magnitude)) More...
void | sendLasertag (uint64_t data, uint16_t nbits=kLasertagBits, uint16_t repeat=kLasertagMinRepeat)
| Send a Lasertag packet/message. Status: STABLE / Working. More...
void | sendCarrierAC (uint64_t data, uint16_t nbits=kCarrierAcBits, uint16_t repeat=kCarrierAcMinRepeat)
| Send a Carrier HVAC formatted message. Status: STABLE / Works on real devices. More...
void | sendCarrierAC40 (uint64_t data, uint16_t nbits=kCarrierAc40Bits, uint16_t repeat=kCarrierAc40MinRepeat)
| Send a Carrier 40bit HVAC formatted message. Status: STABLE / Tested against a real device. More...
void | sendCarrierAC64 (uint64_t data, uint16_t nbits=kCarrierAc64Bits, uint16_t repeat=kCarrierAc64MinRepeat)
| Send a Carrier 64bit HVAC formatted message. Status: STABLE / Known to be working. More...
void | sendHaierAC (const unsigned char data[], const uint16_t nbytes=kHaierACStateLength, const uint16_t repeat=kHaierAcDefaultRepeat)
| Send a Haier A/C formatted message. (HSU07-HEA03 remote) Status: STABLE / Known to be working. More...
void | sendHaierACYRW02 (const unsigned char data[], const uint16_t nbytes=kHaierACYRW02StateLength, const uint16_t repeat=kHaierAcYrw02DefaultRepeat)
| Send a Haier YR-W02 remote A/C formatted message. Status: Alpha / Untested on a real device. More...
void | sendHitachiAC (const unsigned char data[], const uint16_t nbytes=kHitachiAcStateLength, const uint16_t repeat=kHitachiAcDefaultRepeat)
| Send a Hitachi 28-byte/224-bit A/C formatted message. (HITACHI_AC) Status: STABLE / Working. More...
void | sendHitachiAC1 (const unsigned char data[], const uint16_t nbytes=kHitachiAc1StateLength, const uint16_t repeat=kHitachiAcDefaultRepeat)
| Send a Hitachi 13 byte/224-bit A/C formatted message. (HITACHI_AC1) Status: STABLE / Confirmed Working. More...
void | sendHitachiAC2 (const unsigned char data[], const uint16_t nbytes=kHitachiAc2StateLength, const uint16_t repeat=kHitachiAcDefaultRepeat)
| Send a Hitachi 53 byte/424-bit A/C formatted message. (HITACHI_AC2) Basically the same as sendHitatchiAC() except different size. Status: STABLE / Expected to work. More...
void | sendHitachiAc3 (const unsigned char data[], const uint16_t nbytes, const uint16_t repeat=kHitachiAcDefaultRepeat)
| Send a Hitachi(3) A/C formatted message. (HITACHI_AC3) Status: STABLE / Working fine. More...
void | sendHitachiAc344 (const unsigned char data[], const uint16_t nbytes=kHitachiAc344StateLength, const uint16_t repeat=kHitachiAcDefaultRepeat)
| Send a Hitachi A/C 43-byte/344-bit message. (HITACHI_AC344) Basically the same as sendHitatchiAC() except different size. Status: Beta / Probably works. More...
void | sendHitachiAc424 (const unsigned char data[], const uint16_t nbytes=kHitachiAc424StateLength, const uint16_t repeat=kHitachiAcDefaultRepeat)
| Send a Hitachi 53-byte/424-bit A/C formatted message. (HITACHI_AC424) Status: STABLE / Reported as working. More...
void | sendGICable (uint64_t data, uint16_t nbits=kGicableBits, uint16_t repeat=kGicableMinRepeat)
| Send a raw G.I. Cable formatted message. Status: Alpha / Untested. More...
void | sendWhirlpoolAC (const unsigned char data[], const uint16_t nbytes=kWhirlpoolAcStateLength, const uint16_t repeat=kWhirlpoolAcDefaultRepeat)
| Send a Whirlpool A/C message. Status: BETA / Probably works. More...
void | sendLutron (uint64_t data, uint16_t nbits=kLutronBits, uint16_t repeat=kNoRepeat)
| Send a Lutron formatted message. Status: Stable / Appears to be working for real devices. More...
void | sendElectraAC (const unsigned char data[], const uint16_t nbytes=kElectraAcStateLength, const uint16_t repeat=kNoRepeat)
| Send a Electra A/C formatted message. Status: Alpha / Needs testing against a real device. More...
void | sendPanasonicAC (const unsigned char data[], const uint16_t nbytes=kPanasonicAcStateLength, const uint16_t repeat=kPanasonicAcDefaultRepeat)
| Send a Panasonic A/C message. Status: STABLE / Work with real device(s). More...
void | sendPanasonicAC32 (const uint64_t data, const uint16_t nbits=kPanasonicAc32Bits, const uint16_t repeat=kPanasonicAcDefaultRepeat)
| Send a Panasonic AC 32/16bit formatted message. Status: STABLE / Confirmed working. More...
void | sendPioneer (const uint64_t data, const uint16_t nbits=kPioneerBits, const uint16_t repeat=kNoRepeat)
| Send a raw Pioneer formatted message. Status: STABLE / Expected to be working. More...
uint64_t | encodePioneer (uint16_t address, uint16_t command)
| Calculate the raw Pioneer data code based on two NEC sub-codes Status: STABLE / Expected to work. More...
void | sendMWM (const unsigned char data[], const uint16_t nbytes, const uint16_t repeat=kNoRepeat)
| Send a MWM packet/message. Status: Implemented. More...
void | sendVestelAc (const uint64_t data, const uint16_t nbits=kVestelAcBits, const uint16_t repeat=kNoRepeat)
| Send a Vestel message Status: STABLE / Working. More...
void | sendTcl112Ac (const unsigned char data[], const uint16_t nbytes=kTcl112AcStateLength, const uint16_t repeat=kTcl112AcDefaultRepeat)
| Send a TCL 112-bit A/C message. Status: Beta / Probably working. More...
void | sendTeco (const uint64_t data, const uint16_t nbits=kTecoBits, const uint16_t repeat=kNoRepeat)
| Send a Teco A/C message. Status: Beta / Probably working. More...
void | sendLegoPf (const uint64_t data, const uint16_t nbits=kLegoPfBits, const uint16_t repeat=kLegoPfMinRepeat)
| Send a LEGO Power Functions message. Status: Beta / Should work. More...
void | sendNeoclima (const unsigned char data[], const uint16_t nbytes=kNeoclimaStateLength, const uint16_t repeat=kNeoclimaMinRepeat)
| Send a Neoclima message. Status: STABLE / Known to be working. More...
void | sendAmcor (const unsigned char data[], const uint16_t nbytes=kAmcorStateLength, const uint16_t repeat=kAmcorDefaultRepeat)
| Send a Amcor HVAC formatted message. Status: STABLE / Reported as working. More...
void | sendEpson (uint64_t data, uint16_t nbits=kEpsonBits, uint16_t repeat=kEpsonMinRepeat)
| Send an Epson formatted message. Status: Beta / Probably works. More...
void | sendSymphony (uint64_t data, uint16_t nbits=kSymphonyBits, uint16_t repeat=kSymphonyDefaultRepeat)
| Send a Symphony packet. Status: STABLE / Should be working. More...
void | sendAirwell (uint64_t data, uint16_t nbits=kAirwellBits, uint16_t repeat=kAirwellMinRepeats)
| Send an Airwell Manchester Code formatted message. Status: BETA / Appears to be working. More...
void | sendDelonghiAc (uint64_t data, uint16_t nbits=kDelonghiAcBits, uint16_t repeat=kDelonghiAcDefaultRepeat)
| Send a Delonghi A/C formatted message. Status: STABLE / Reported as working on a real device. More...
void | sendDoshisha (const uint64_t data, uint16_t nbits=kDoshishaBits, const uint16_t repeat=kNoRepeat)
| Send a Doshisha formatted message. Status: STABLE / Works on real device. More...
uint64_t | encodeDoshisha (const uint8_t command, const uint8_t channel=0)
| Encode Doshisha combining constant values with command and channel. Status: STABLE / Working. More...
void | sendMultibrackets (const uint64_t data, const uint16_t nbits=kMultibracketsBits, const uint16_t repeat=kMultibracketsDefaultRepeat)
| Send a Multibrackets formatted message. Status: BETA / Appears to be working. More...
void | sendTechnibelAc (uint64_t data, uint16_t nbits=kTechnibelAcBits, uint16_t repeat=kTechnibelAcDefaultRepeat)
| Send an Technibel AC formatted message. Status: STABLE / Reported as working on a real device. More...
void | sendCoronaAc (const uint8_t data[], const uint16_t nbytes=kCoronaAcStateLength, const uint16_t repeat=kNoRepeat)
| Send a CoronaAc formatted message. Status: STABLE / Working on real device. More...
void | sendZepeal (const uint64_t data, const uint16_t nbits=kZepealBits, const uint16_t repeat=kZepealMinRepeat)
| Send a Zepeal formatted message. Status: STABLE / Works on real device. More...
void | sendVoltas (const unsigned char data[], const uint16_t nbytes=kVoltasStateLength, const uint16_t repeat=kNoRepeat)
| Send a Voltas formatted message. Status: STABLE / Working on real device. More...
void | sendMetz (const uint64_t data, const uint16_t nbits=kMetzBits, const uint16_t repeat=kMetzMinRepeat)
| Send a Metz formatted message. Status: Beta / Needs testing against a real device. More...
void | sendTranscold (const uint64_t data, const uint16_t nbits=kTranscoldBits, const uint16_t repeat=kTranscoldDefaultRepeat)
| Send a Transcold message Status: STABLE / Confirmed Working. More...
void | sendElitescreens (const uint64_t data, const uint16_t nbits=kEliteScreensBits, const uint16_t repeat=kEliteScreensDefaultRepeat)
| Send an Elite Screens formatted message. Status: BETA / Probably Working. More...

## Static Public Member Functions

static uint16_t | minRepeats (const decode_type_t protocol)
| Get the minimum number of repeats for a given protocol. More...
static uint16_t | defaultBits (const decode_type_t protocol)
| Get the default number of bits for a given protocol. More...
static uint32_t | encodeMetz (const uint8_t address, const uint8_t command, const bool toggle=false)
| Encode a Metz address, command, and toggle bits into a code suitable for use with sendMetz(). More...

## Protected Member Functions

VIRTUAL void | ledOff ()
| Turn off the IR LED. More...
VIRTUAL void | ledOn ()
| Turn on the IR LED. More...

## Protected Attributes

uint8_t | outputOn
uint8_t | outputOff

## Private Member Functions

uint32_t | calcUSecPeriod (uint32_t hz, bool use_offset=true)
| Calculate the period for a given frequency. More...
void | _sendSony (const uint64_t data, const uint16_t nbits, const uint16_t repeat, const uint16_t freq)
| Internal procedure to generate a Sony/SIRC(Serial Infra-Red Control) message Status: STABLE / Known working. More...

## Private Attributes

uint32_t | _freq_unittest
uint16_t | onTimePeriod
uint16_t | offTimePeriod
uint16_t | IRpin
int8_t | periodOffset
uint8_t | _dutycycle
bool | modulation

## Detailed Description

Class for sending all basic IR protocols.

Note
  Originally from https://github.com/shirriff/Arduino-IRremote/ Updated by markszabo (https://github.com/crankyoldgit/IRremoteESP8266) for sending IR code on ESP8266

## Constructor & Destructor Documentation

## IRsend()

IRsend::IRsend | ( | uint16_t | IRsendPin,
|  | bool | inverted = `false`,
|  | bool | use_modulation = `true`
| ) |  |

explicit

Constructor for an IRsend object.

Parameters

  [in] | IRsendPin | Which GPIO pin to use when sending an IR command.
  [in] | inverted | Optional flag to invert the output. (default = false) e.g. LED is illuminated when GPIO is LOW rather than HIGH.

Warning
  Setting `inverted` to something other than the default could easily destroy your IR LED if you are overdriving it. Unless you REALLY know what you are doing, don't change this.

Parameters

  [in] | use_modulation | Do we do frequency modulation during transmission? i.e. If not, assume a 100% duty cycle. Ignore attempts to change the duty cycle etc.

## Member Function Documentation

## _delayMicroseconds()

void IRsend::_delayMicroseconds | ( | uint32_t | usec | ) |

An ESP8266 RTOS watch-dog timer friendly version of delayMicroseconds().

A version of delayMicroseconds() that handles large values and does NOT use the watch-dog friendly delay() calls where appropriate.

Parameters

  [in] | usec | Nr. of uSeconds to delay for.

Note
  Use this only if you know what you are doing as it may cause the WDT to reset the ESP8266.

## _sendSony()

void IRsend::_sendSony | ( | const uint64_t | data,
|  | const uint16_t | nbits,
|  | const uint16_t | repeat,
|  | const uint16_t | freq
| ) |  |

private

Internal procedure to generate a Sony/SIRC(Serial Infra-Red Control) message Status: STABLE / Known working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.
  [in] | freq | Frequency of the modulation to transmit at. (Hz or kHz)

## begin()

void IRsend::begin | ( |  | ) |

Enable the pin for output.

## calcUSecPeriod()

uint32_t IRsend::calcUSecPeriod | ( | uint32_t | hz,
|  | bool | use_offset = `true`
| ) |  |

private

Calculate the period for a given frequency.

Parameters

  [in] | hz | Frequency in Hz.
  [in] | use_offset | Should we use the calculated offset or not?

Returns
  nr. of uSeconds.

Note
  (T = 1/f)

## calibrate()

int8_t IRsend::calibrate | ( | uint16_t | hz = `38000U` | ) |

Calculate & set any offsets to account for execution times during sending.

Parameters

  [in] | hz | The frequency to calibrate at >= 1000Hz. Default is 38000Hz.

Returns
  The calculated period offset (in uSeconds) which is now in use. e.g. -5.

Note
  This will generate an 65535us mark() IR LED signal. This only needs to be called once, if at all.

## defaultBits()

uint16_t IRsend::defaultBits | ( | const decode_type_t | protocol | ) |

static

Get the default number of bits for a given protocol.

Parameters

  [in] | protocol | Protocol number/type you want the default bit size for.

Returns
  The number of bits.

## enableIROut()

void IRsend::enableIROut | ( | uint32_t | freq,
|  | uint8_t | duty = `kDutyDefault`
| ) |  |

Set the output frequency modulation and duty cycle.

Parameters

  [in] | freq | The freq we want to modulate at. Assumes < 1000 means kHz else Hz.
  [in] | duty | Percentage duty cycle of the LED. e.g. 25 = 25% = 1/4 on, 3/4 off. If you are not sure, try 50 percent. This is ignored if modulation is disabled at object instantiation.

Note
  Integer timing functions & math mean we can't do fractions of microseconds timing. Thus minor changes to the freq & duty values may have limited effect. You've been warned.

## encodeDoshisha()

uint64_t IRsend::encodeDoshisha | ( | const uint8_t | command,
|  | const uint8_t | channel = `0`
| ) |  |

Encode Doshisha combining constant values with command and channel. Status: STABLE / Working.

Parameters

  [in] | command | The command code to be sent.
  [in] | channel | The one bit channel 0 for CH1 and 1 for CH2

Returns
  The corresponding Doshisha code.

## encodeJVC()

uint16_t IRsend::encodeJVC | ( | uint8_t | address,
|  | uint8_t | command
| ) |  |

Calculate the raw JVC data based on address and command. Status: STABLE / Works fine.

Parameters

  [in] | address | An 8-bit address value.
  [in] | command | An 8-bit command value.

Returns
  A raw JVC message code, suitable for sendJVC()..

See also
  http://www.sbprojects.com/knowledge/ir/jvc.php

## encodeLG()

uint32_t IRsend::encodeLG | ( | uint16_t | address,
|  | uint16_t | command
| ) |  |

Construct a raw 28-bit LG message code from the supplied address & command. Status: STABLE / Works.

Parameters

  [in] | address | The address code.
  [in] | command | The command code.

Returns
  A raw 28-bit LG message code suitable for sendLG() etc.

Note
  Sequence of bits = address + command + checksum.

## encodeMagiQuest()

uint64_t IRsend::encodeMagiQuest | ( | const uint32_t | wand_id,
|  | const uint16_t | magnitude
| ) |  |

Encode a MagiQuest wand_id, and a magnitude into a single 64bit value. (Only 48 bits of real data + 8 leading zero bits) This is suitable for calling sendMagiQuest() with. e.g. sendMagiQuest(encodeMagiQuest(wand_id, magnitude))

Parameters

  [in] | wand_id | The value for the wand ID.
  [in] | magnitude | The value for the magnitude

Returns
  A code suitable for calling sendMagiQuest() with.

## encodeMetz()

uint32_t IRsend::encodeMetz | ( | const uint8_t | address,
|  | const uint8_t | command,
|  | const bool | toggle = `false`
| ) |  |

static

Encode a Metz address, command, and toggle bits into a code suitable for use with sendMetz().

Parameters

  [in] | address | A 3-bit address value.
  [in] | command | A 6-bit command value.
  [in] | toggle | Should the toggle bit be set in the result?

Returns
  A 19-bit value suitable for use with `sendMetz()`.

## encodeNEC()

uint32_t IRsend::encodeNEC | ( | uint16_t | address,
|  | uint16_t | command
| ) |  |

Calculate the raw NEC data based on address and command. Status: STABLE / Expected to work.

Parameters

  [in] | address | An address value.
  [in] | command | An 8-bit command value.

Returns
  A raw 32-bit NEC message suitable for use with `sendNEC()`.

See also
  http://www.sbprojects.com/knowledge/ir/nec.php

## encodePanasonic()

uint64_t IRsend::encodePanasonic | ( | const uint16_t | manufacturer,
|  | const uint8_t | device,
|  | const uint8_t | subdevice,
|  | const uint8_t | function
| ) |  |

Calculate the raw Panasonic data based on device, subdevice, & function. Status: STABLE / Should be working.

Parameters

  [in] | manufacturer | A 16-bit manufacturer code. e.g. 0x4004 is Panasonic
  [in] | device | An 8-bit code.
  [in] | subdevice | An 8-bit code.
  [in] | function | An 8-bit code.

Returns
  A value suitable for use with `sendPanasonic64()`.

Note
  Panasonic 48-bit protocol is a modified version of Kaseikyo.

See also
  http://www.remotecentral.com/cgi-bin/mboard/rc-pronto/thread.cgi?2615

## encodePioneer()

uint64_t IRsend::encodePioneer | ( | uint16_t | address,
|  | uint16_t | command
| ) |  |

Calculate the raw Pioneer data code based on two NEC sub-codes Status: STABLE / Expected to work.

Parameters

  [in] | address | A 16-bit "published" NEC value.
  [in] | command | A 16-bit "published" NEC value.

Returns
  A raw 64-bit Pioneer message code for use with `sendPioneer()``

Note
  Address & Command can be take from a decode result OR from the spreadsheets located at: https://www.pioneerelectronics.com/PUSA/Support/Home-Entertainment-Custom-Install/IR+Codes/A+V+Receivers where the first part is considered the address, and the second the command. e.g. "A556+AF20" is an Address of 0xA556 & a Command of 0xAF20.

## encodeRC5()

uint16_t IRsend::encodeRC5 | ( | const uint8_t | address,
|  | const uint8_t | command,
|  | const bool | key_released = `false`
| ) |  |

Encode a Philips RC-5 data message. Status: Beta / Should be working.

Parameters

  [in] | address | The 5-bit address value for the message.
  [in] | command | The 6-bit command value for the message.
  [in] | key_released | Indicate if the remote key has been released.

Returns
  A message suitable for use in sendRC5().

## encodeRC5X()

uint16_t IRsend::encodeRC5X | ( | const uint8_t | address,
|  | const uint8_t | command,
|  | const bool | key_released = `false`
| ) |  |

Encode a Philips RC-5X data message. Status: Beta / Should be working.

Parameters

  [in] | address | The 5-bit address value for the message.
  [in] | command | The 7-bit command value for the message.
  [in] | key_released | Indicate if the remote key has been released.

Returns
  A message suitable for use in sendRC5().

## encodeRC6()

uint64_t IRsend::encodeRC6 | ( | const uint32_t | address,
|  | const uint8_t | command,
|  | const uint16_t | mode = `kRC6Mode0Bits`
| ) |  |

Encode a Philips RC-6 data message. Status: Beta / Should be working.

Parameters

  [in] | address | The address (aka. control) value for the message. Includes the field/mode/toggle bits.
  [in] | command | The 8-bit command value for the message. (aka. information)
  [in] | mode | Which protocol to use. Defined by nr. of bits in the protocol.

Returns
  A data message suitable for use in `sendRC6()`.

## encodeSAMSUNG()

uint32_t IRsend::encodeSAMSUNG | ( | const uint8_t | customer,
|  | const uint8_t | command
| ) |  |

Construct a raw Samsung message from the supplied customer(address) & command. Status: STABLE / Should be working.

Parameters

  [in] | customer | The customer code. (aka. Address)
  [in] | command | The command code.

Returns
  A raw 32-bit Samsung message suitable for `sendSAMSUNG()`.

## encodeSanyoLC7461()

uint64_t IRsend::encodeSanyoLC7461 | ( | uint16_t | address,
|  | uint8_t | command
| ) |  |

Construct a Sanyo LC7461 message.

Parameters

  [in] | address | The 13 bit value of the address(Custom) portion of the protocol.
  [in] | command | The 8 bit value of the command(Key) portion of the protocol.

Returns
  An uint64_t with the encoded raw 42 bit Sanyo LC7461 data value.

Note
  This protocol uses the NEC protocol timings. However, data is formatted as : address(13 bits), !address, command(8 bits), !command. According with LIRC, this protocol is used on Sanyo, Aiwa and Chinon

## encodeSharp()

uint32_t IRsend::encodeSharp | ( | const uint16_t | address,
|  | const uint16_t | command,
|  | const uint16_t | expansion = `1`,
|  | const uint16_t | check = `0`,
|  | const bool | MSBfirst = `false`
| ) |  |

Encode a (raw) Sharp message from it's components. Status: STABLE / Works okay.

Parameters

  [in] | address | The value of the address to be sent.
  [in] | command | The value of the address to be sent. (8 bits)
  [in] | expansion | The value of the expansion bit to use. (0 or 1, typically 1)
  [in] | check | The value of the check bit to use. (0 or 1, typically 0)
  [in] | MSBfirst | Flag indicating MSB first or LSB first order.

Returns
  A uint32_t containing the raw Sharp message for `sendSharpRaw()`.

Note
  Assumes the standard Sharp bit sizes. Historically sendSharp() sends address & command in MSB first order. This is actually incorrect. It should be sent in LSB order. The behaviour of sendSharp() hasn't been changed to maintain backward compatibility.

## encodeSony()

uint32_t IRsend::encodeSony | ( | const uint16_t | nbits,
|  | const uint16_t | command,
|  | const uint16_t | address,
|  | const uint16_t | extended = `0`
| ) |  |

Convert Sony/SIRC command, address, & extended bits into sendSony format. Status: STABLE / Should be working.

Parameters

  [in] | nbits | Sony protocol bit size.
  [in] | command | Sony command bits.
  [in] | address | Sony address bits.
  [in] | extended | Sony extended bits.

Returns
  A `sendSony()` etc compatible data message.

## ledOff()

void IRsend::ledOff | ( |  | ) |

protected

Turn off the IR LED.

## ledOn()

void IRsend::ledOn | ( |  | ) |

protected

Turn on the IR LED.

## mark()

uint16_t IRsend::mark | ( | uint16_t | usec | ) |

Modulate the IR LED for the given period (usec) and at the duty cycle set.

Parameters

  [in] | usec | The period of time to modulate the IR LED for, in microseconds.

Returns
  Nr. of pulses actually sent.

Note
  The ESP8266 has no good way to do hardware PWM, so we have to do it all in software. There is a horrible kludge/brilliant hack to use the second serial TX line to do fairly accurate hardware PWM, but it is only available on a single specific GPIO and only available on some modules. e.g. It's not available on the ESP-01 module. Hence, for greater compatibility & choice, we don't use that method. Ref: https://www.analysir.com/blog/2017/01/29/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals/

## minRepeats()

uint16_t IRsend::minRepeats | ( | const decode_type_t | protocol | ) |

static

Get the minimum number of repeats for a given protocol.

Parameters

  [in] | protocol | Protocol number/type of the message you want to send.

Returns
  The number of repeats required.

## send() [1/2]

bool IRsend::send | ( | const decode_type_t | type,
|  | const uint64_t | data,
|  | const uint16_t | nbits,
|  | const uint16_t | repeat = `kNoRepeat`
| ) |  |

Send a simple (up to 64 bits) IR message of a given type. An unknown/unsupported type will send nothing.

Parameters

  [in] | type | Protocol number/type of the message you want to send.
  [in] | data | The data you want to send (up to 64 bits).
  [in] | nbits | How many bits long the message is to be.
  [in] | repeat | How many repeats to do?

Returns
  True if it is a type we can attempt to send, false if not.

## send() [2/2]

bool IRsend::send | ( | const decode_type_t | type,
|  | const uint8_t * | state,
|  | const uint16_t | nbytes
| ) |  |

Send a complex (>= 64 bits) IR message of a given type. An unknown/unsupported type will send nothing.

Parameters

  [in] | type | Protocol number/type of the message you want to send.
  [in] | state | A pointer to the array of bytes that make up the state[].
  [in] | nbytes | How many bytes are in the state.

Returns
  True if it is a type we can attempt to send, false if not.

## sendAirwell()

void IRsend::sendAirwell | ( | uint64_t | data,
|  | uint16_t | nbits = `kAirwellBits`,
|  | uint16_t | repeat = `kAirwellMinRepeats`
| ) |  |

Send an Airwell Manchester Code formatted message. Status: BETA / Appears to be working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of the message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

See also
  https://github.com/crankyoldgit/IRremoteESP8266/issues/1069

## sendAiwaRCT501()

void IRsend::sendAiwaRCT501 | ( | uint64_t | data,
|  | uint16_t | nbits = `kAiwaRcT501Bits`,
|  | uint16_t | repeat = `kAiwaRcT501MinRepeats`
| ) |  |

Send an Aiwa RC T501 formatted message. Status: BETA / Should work.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of the message to be sent. Typically kAiwaRcT501Bits. Max is 37 = (64 - 27)
  [in] | repeat | The number of times the command is to be repeated.

See also
  http://lirc.sourceforge.net/remotes/aiwa/RC-T501

## sendAmcor()

void IRsend::sendAmcor | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kAmcorStateLength`,
|  | const uint16_t | repeat = `kAmcorDefaultRepeat`
| ) |  |

Send a Amcor HVAC formatted message. Status: STABLE / Reported as working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendArgo()

void IRsend::sendArgo | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kArgoStateLength`,
|  | const uint16_t | repeat = `kArgoDefaultRepeat`
| ) |  |

Send a Argo A/C formatted message. Status: BETA / Probably works.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendCarrierAC()

void IRsend::sendCarrierAC | ( | uint64_t | data,
|  | uint16_t | nbits = `kCarrierAcBits`,
|  | uint16_t | repeat = `kCarrierAcMinRepeat`
| ) |  |

Send a Carrier HVAC formatted message. Status: STABLE / Works on real devices.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendCarrierAC40()

void IRsend::sendCarrierAC40 | ( | uint64_t | data,
|  | uint16_t | nbits = `kCarrierAc40Bits`,
|  | uint16_t | repeat = `kCarrierAc40MinRepeat`
| ) |  |

Send a Carrier 40bit HVAC formatted message. Status: STABLE / Tested against a real device.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The bit size of the message being sent.
  [in] | repeat | The number of times the message is to be repeated.

## sendCarrierAC64()

void IRsend::sendCarrierAC64 | ( | uint64_t | data,
|  | uint16_t | nbits = `kCarrierAc64Bits`,
|  | uint16_t | repeat = `kCarrierAc64MinRepeat`
| ) |  |

Send a Carrier 64bit HVAC formatted message. Status: STABLE / Known to be working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The bit size of the message being sent.
  [in] | repeat | The number of times the message is to be repeated.

## sendCOOLIX()

void IRsend::sendCOOLIX | ( | uint64_t | data,
|  | uint16_t | nbits = `kCoolixBits`,
|  | uint16_t | repeat = `kCoolixDefaultRepeat`
| ) |  |

Send a Coolix message Status: STABLE / Confirmed Working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

See also
  https://github.com/z3t0/Arduino-IRremote/blob/master/ir_COOLIX.cpp

## sendCoronaAc()

void IRsend::sendCoronaAc | ( | const uint8_t | data[],
|  | const uint16_t | nbytes = `kCoronaAcStateLength`,
|  | const uint16_t | repeat = `kNoRepeat`
| ) |  |

Send a CoronaAc formatted message. Status: STABLE / Working on real device.

Parameters

  [in] | data | An array of bytes containing the IR command.
  [in] | nbytes | Nr. of bytes of data in the array. e.g. uint8_t data[kCoronaAcStateLength] = { 0x28, 0x61, 0x3D, 0x19, 0xE6, 0x37, 0xC8, 0x28, 0x61, 0x6D, 0xFF, 0x00, 0xFF, 0x00, 0x28, 0x61, 0xCD, 0xFF, 0x00, 0xFF, 0x00};
  [in] | repeat | Nr. of times the message is to be repeated.

## sendDaikin()

void IRsend::sendDaikin | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kDaikinStateLength`,
|  | const uint16_t | repeat = `kDaikinDefaultRepeat`
| ) |  |

Send a Daikin 280-bit A/C formatted message. Status: STABLE.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

See also
  https://github.com/mharizanov/Daikin-AC-remote-control-over-the-Internet/tree/master/IRremote
  https://github.com/blafois/Daikin-IR-Reverse

## sendDaikin128()

void IRsend::sendDaikin128 | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kDaikin128StateLength`,
|  | const uint16_t | repeat = `kDaikin128DefaultRepeat`
| ) |  |

Send a Daikin128 (128-bit) A/C formatted message. Status: STABLE / Known Working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

See also
  https://github.com/crankyoldgit/IRremoteESP8266/issues/827

## sendDaikin152()

void IRsend::sendDaikin152 | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kDaikin152StateLength`,
|  | const uint16_t | repeat = `kDaikin152DefaultRepeat`
| ) |  |

Send a Daikin152 (152-bit) A/C formatted message. Status: STABLE / Known Working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

See also
  https://github.com/crankyoldgit/IRremoteESP8266/issues/873

## sendDaikin160()

void IRsend::sendDaikin160 | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kDaikin160StateLength`,
|  | const uint16_t | repeat = `kDaikin160DefaultRepeat`
| ) |  |

Send a Daikin160 (160-bit) A/C formatted message. Status: STABLE / Confirmed working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

See also
  https://github.com/crankyoldgit/IRremoteESP8266/issues/731

## sendDaikin176()

void IRsend::sendDaikin176 | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kDaikin176StateLength`,
|  | const uint16_t | repeat = `kDaikin176DefaultRepeat`
| ) |  |

Send a Daikin176 (176-bit) A/C formatted message. Status: STABLE / Working on a real device.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendDaikin2()

void IRsend::sendDaikin2 | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kDaikin2StateLength`,
|  | const uint16_t | repeat = `kDaikin2DefaultRepeat`
| ) |  |

Send a Daikin2 (312-bit) A/C formatted message. Status: STABLE / Expected to work.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

See also
  https://github.com/crankyoldgit/IRremoteESP8266/issues/582

## sendDaikin216()

void IRsend::sendDaikin216 | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kDaikin216StateLength`,
|  | const uint16_t | repeat = `kDaikin216DefaultRepeat`
| ) |  |

Send a Daikin216 (216-bit) A/C formatted message. Status: Alpha / Untested on a real device.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

See also
  https://github.com/crankyoldgit/IRremoteESP8266/issues/689
  https://github.com/danny-source/Arduino_DY_IRDaikin

## sendDaikin64()

void IRsend::sendDaikin64 | ( | const uint64_t | data,
|  | const uint16_t | nbits = `kDaikin64Bits`,
|  | const uint16_t | repeat = `kDaikin64DefaultRepeat`
| ) |  |

Send a Daikin64 (64-bit) A/C formatted message. Status: Beta / Probably Working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

See also
  https://github.com/crankyoldgit/IRremoteESP8266/issues/1064

## sendData()

void IRsend::sendData | ( | uint16_t | onemark,
|  | uint32_t | onespace,
|  | uint16_t | zeromark,
|  | uint32_t | zerospace,
|  | uint64_t | data,
|  | uint16_t | nbits,
|  | bool | MSBfirst = `true`
| ) |  |

Generic method for sending data that is common to most protocols. Will send leading or trailing 0's if the nbits is larger than the number of bits in data.

Parameters

  [in] | onemark | Nr. of usecs for the led to be pulsed for a '1' bit.
  [in] | onespace | Nr. of usecs for the led to be fully off for a '1' bit.
  [in] | zeromark | Nr. of usecs for the led to be pulsed for a '0' bit.
  [in] | zerospace | Nr. of usecs for the led to be fully off for a '0' bit.
  [in] | data | The data to be transmitted.
  [in] | nbits | Nr. of bits of data to be sent.
  [in] | MSBfirst | Flag for bit transmission order. Defaults to MSB->LSB order.

## sendDelonghiAc()

void IRsend::sendDelonghiAc | ( | uint64_t | data,
|  | uint16_t | nbits = `kDelonghiAcBits`,
|  | uint16_t | repeat = `kDelonghiAcDefaultRepeat`
| ) |  |

Send a Delonghi A/C formatted message. Status: STABLE / Reported as working on a real device.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

See also
  https://github.com/crankyoldgit/IRremoteESP8266/issues/1096

## sendDenon()

void IRsend::sendDenon | ( | uint64_t | data,
|  | uint16_t | nbits = `kDenonBits`,
|  | uint16_t | repeat = `kNoRepeat`
| ) |  |

Send a Denon formatted message. Status: STABLE / Should be working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

Note
  Some Denon devices use a Kaseikyo/Panasonic 48-bit format Others use the Sharp protocol.

## sendDISH()

void IRsend::sendDISH | ( | uint64_t | data,
|  | uint16_t | nbits = `kDishBits`,
|  | uint16_t | repeat = `kDishMinRepeat`
| ) |  |

Send a DISH NETWORK formatted message. Status: STABLE / Working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

Note
  Dishplayer is a different protocol. Typically a DISH device needs to get a command a total of at least 4 times to accept it. e.g. repeat=3

Here is the LIRC file I found that seems to match the remote codes from the oscilloscope: DISH NETWORK (echostar 301):

See also
  http://lirc.sourceforge.net/remotes/echostar/301_501_3100_5100_58xx_59xx
  http://www.hifi-remote.com/wiki/index.php?title=Dish

## sendDoshisha()

void IRsend::sendDoshisha | ( | const uint64_t | data,
|  | uint16_t | nbits = `kDoshishaBits`,
|  | const uint16_t | repeat = `kNoRepeat`
| ) |  |

Send a Doshisha formatted message. Status: STABLE / Works on real device.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendElectraAC()

void IRsend::sendElectraAC | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kElectraAcStateLength`,
|  | const uint16_t | repeat = `kNoRepeat`
| ) |  |

Send a Electra A/C formatted message. Status: Alpha / Needs testing against a real device.

Parameters

  [in] | data | The message to be sent.

Note
  Guessing MSBF order.

Parameters

  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendElitescreens()

void IRsend::sendElitescreens | ( | const uint64_t | data,
|  | const uint16_t | nbits = `kEliteScreensBits`,
|  | const uint16_t | repeat = `kEliteScreensDefaultRepeat`
| ) |  |

Send an Elite Screens formatted message. Status: BETA / Probably Working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendEpson()

void IRsend::sendEpson | ( | uint64_t | data,
|  | uint16_t | nbits = `kEpsonBits`,
|  | uint16_t | repeat = `kEpsonMinRepeat`
| ) |  |

Send an Epson formatted message. Status: Beta / Probably works.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of nbits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendFujitsuAC()

void IRsend::sendFujitsuAC | ( | const unsigned char | data[],
|  | const uint16_t | nbytes,
|  | const uint16_t | repeat = `kFujitsuAcMinRepeat`
| ) |  |

Send a Fujitsu A/C formatted message. Status: STABLE / Known Good.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent. Typically one of: kFujitsuAcStateLength, kFujitsuAcStateLength - 1, kFujitsuAcStateLengthShort, kFujitsuAcStateLengthShort - 1
  [in] | repeat | The number of times the command is to be repeated.

## sendGC()

void IRsend::sendGC | ( | uint16_t | buf[],
|  | uint16_t | len
| ) |  |

Send a shortened GlobalCache (GC) IRdb/control tower formatted message. Status: STABLE / Known working.

Parameters

  [in] | buf | Array of uint16_t containing the shortened GlobalCache data.
  [in] | len | Nr. of entries in the buf[] array.

Note
  Global Cache format without the emitter ID or request ID. Starts at the frequency (Hertz), followed by nr. of times to emit (count), then the offset for repeats (where a repeat will start from), then the rest of entries are the actual IR message as units of periodic time. e.g. sendir,1:1,1,38000,1,1,9,70,9,30,9,... -> 38000,1,1,9,70,9,30,9,...

See also
  https://irdb.globalcache.com/Home/Database

## sendGeneric() [1/3]

void IRsend::sendGeneric | ( | const uint16_t | headermark,
|  | const uint32_t | headerspace,
|  | const uint16_t | onemark,
|  | const uint32_t | onespace,
|  | const uint16_t | zeromark,
|  | const uint32_t | zerospace,
|  | const uint16_t | footermark,
|  | const uint32_t | gap,
|  | const uint32_t | mesgtime,
|  | const uint64_t | data,
|  | const uint16_t | nbits,
|  | const uint16_t | frequency,
|  | const bool | MSBfirst,
|  | const uint16_t | repeat,
|  | const uint8_t | dutycycle
| ) |  |

Generic method for sending simple protocol messages. Will send leading or trailing 0's if the nbits is larger than the number of bits in data.

Parameters

  [in] | headermark | Nr. of usecs for the led to be pulsed for the header mark. A value of 0 means no header mark.
  [in] | headerspace | Nr. of usecs for the led to be off after the header mark. A value of 0 means no header space.
  [in] | onemark | Nr. of usecs for the led to be pulsed for a '1' bit.
  [in] | onespace | Nr. of usecs for the led to be fully off for a '1' bit.
  [in] | zeromark | Nr. of usecs for the led to be pulsed for a '0' bit.
  [in] | zerospace | Nr. of usecs for the led to be fully off for a '0' bit.
  [in] | footermark | Nr. of usecs for the led to be pulsed for the footer mark. A value of 0 means no footer mark.
  [in] | gap | Nr. of usecs for the led to be off after the footer mark. This is effectively the gap between messages. A value of 0 means no gap space.
  [in] | mesgtime | Min. nr. of usecs a single message needs to be. This is effectively the min. total length of a single message.
  [in] | data | The data to be transmitted.
  [in] | nbits | Nr. of bits of data to be sent.
  [in] | frequency | The frequency we want to modulate at. (Hz/kHz)
  [in] | MSBfirst | Flag for bit transmission order. Defaults to MSB->LSB order.
  [in] | repeat | Nr. of extra times the message will be sent. e.g. 0 = 1 message sent, 1 = 1 initial + 1 repeat = 2 messages
  [in] | dutycycle | Percentage duty cycle of the LED. e.g. 25 = 25% = 1/4 on, 3/4 off. If you are not sure, try 50 percent.

Note
  Assumes a frequency < 1000 means kHz otherwise it is in Hz. Most common value is 38000 or 38, for 38kHz.

## sendGeneric() [2/3]

void IRsend::sendGeneric | ( | const uint16_t | headermark,
|  | const uint32_t | headerspace,
|  | const uint16_t | onemark,
|  | const uint32_t | onespace,
|  | const uint16_t | zeromark,
|  | const uint32_t | zerospace,
|  | const uint16_t | footermark,
|  | const uint32_t | gap,
|  | const uint64_t | data,
|  | const uint16_t | nbits,
|  | const uint16_t | frequency,
|  | const bool | MSBfirst,
|  | const uint16_t | repeat,
|  | const uint8_t | dutycycle
| ) |  |

Generic method for sending simple protocol messages. Will send leading or trailing 0's if the nbits is larger than the number of bits in data.

Parameters

  [in] | headermark | Nr. of usecs for the led to be pulsed for the header mark. A value of 0 means no header mark.
  [in] | headerspace | Nr. of usecs for the led to be off after the header mark. A value of 0 means no header space.
  [in] | onemark | Nr. of usecs for the led to be pulsed for a '1' bit.
  [in] | onespace | Nr. of usecs for the led to be fully off for a '1' bit.
  [in] | zeromark | Nr. of usecs for the led to be pulsed for a '0' bit.
  [in] | zerospace | Nr. of usecs for the led to be fully off for a '0' bit.
  [in] | footermark | Nr. of usecs for the led to be pulsed for the footer mark. A value of 0 means no footer mark.
  [in] | gap | Nr. of usecs for the led to be off after the footer mark. This is effectively the gap between messages. A value of 0 means no gap space.
  [in] | data | The data to be transmitted.
  [in] | nbits | Nr. of bits of data to be sent.
  [in] | frequency | The frequency we want to modulate at. (Hz/kHz)
  [in] | MSBfirst | Flag for bit transmission order. Defaults to MSB->LSB order.
  [in] | repeat | Nr. of extra times the message will be sent. e.g. 0 = 1 message sent, 1 = 1 initial + 1 repeat = 2 messages
  [in] | dutycycle | Percentage duty cycle of the LED. e.g. 25 = 25% = 1/4 on, 3/4 off. If you are not sure, try 50 percent.

Note
  Assumes a frequency < 1000 means kHz otherwise it is in Hz. Most common value is 38000 or 38, for 38kHz.

## sendGeneric() [3/3]

void IRsend::sendGeneric | ( | const uint16_t | headermark,
|  | const uint32_t | headerspace,
|  | const uint16_t | onemark,
|  | const uint32_t | onespace,
|  | const uint16_t | zeromark,
|  | const uint32_t | zerospace,
|  | const uint16_t | footermark,
|  | const uint32_t | gap,
|  | const uint8_t * | dataptr,
|  | const uint16_t | nbytes,
|  | const uint16_t | frequency,
|  | const bool | MSBfirst,
|  | const uint16_t | repeat,
|  | const uint8_t | dutycycle
| ) |  |

Generic method for sending simple protocol messages.

Parameters

  [in] | headermark | Nr. of usecs for the led to be pulsed for the header mark. A value of 0 means no header mark.
  [in] | headerspace | Nr. of usecs for the led to be off after the header mark. A value of 0 means no header space.
  [in] | onemark | Nr. of usecs for the led to be pulsed for a '1' bit.
  [in] | onespace | Nr. of usecs for the led to be fully off for a '1' bit.
  [in] | zeromark | Nr. of usecs for the led to be pulsed for a '0' bit.
  [in] | zerospace | Nr. of usecs for the led to be fully off for a '0' bit.
  [in] | footermark | Nr. of usecs for the led to be pulsed for the footer mark. A value of 0 means no footer mark.
  [in] | gap | Nr. of usecs for the led to be off after the footer mark. This is effectively the gap between messages. A value of 0 means no gap space.
  [in] | dataptr | Pointer to the data to be transmitted.
  [in] | nbytes | Nr. of bytes of data to be sent.
  [in] | frequency | The frequency we want to modulate at. (Hz/kHz)
  [in] | MSBfirst | Flag for bit transmission order. Defaults to MSB->LSB order.
  [in] | repeat | Nr. of extra times the message will be sent. e.g. 0 = 1 message sent, 1 = 1 initial + 1 repeat = 2 messages
  [in] | dutycycle | Percentage duty cycle of the LED. e.g. 25 = 25% = 1/4 on, 3/4 off. If you are not sure, try 50 percent.

Note
  Assumes a frequency < 1000 means kHz otherwise it is in Hz. Most common value is 38000 or 38, for 38kHz.

## sendGICable()

void IRsend::sendGICable | ( | uint64_t | data,
|  | uint16_t | nbits = `kGicableBits`,
|  | uint16_t | repeat = `kGicableMinRepeat`
| ) |  |

Send a raw G.I. Cable formatted message. Status: Alpha / Untested.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendGoodweather()

void IRsend::sendGoodweather | ( | const uint64_t | data,
|  | const uint16_t | nbits = `kGoodweatherBits`,
|  | const uint16_t | repeat = `kGoodweatherMinRepeat`
| ) |  |

Send a Goodweather HVAC formatted message. Status: BETA / Needs testing on real device.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendGree() [1/2]

void IRsend::sendGree | ( | const uint64_t | data,
|  | const uint16_t | nbits = `kGreeBits`,
|  | const uint16_t | repeat = `kGreeDefaultRepeat`
| ) |  |

Send a Gree Heat Pump formatted message. Status: STABLE / Working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendGree() [2/2]

void IRsend::sendGree | ( | const uint8_t | data[],
|  | const uint16_t | nbytes = `kGreeStateLength`,
|  | const uint16_t | repeat = `kGreeDefaultRepeat`
| ) |  |

Send a Gree Heat Pump formatted message. Status: STABLE / Working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendHaierAC()

void IRsend::sendHaierAC | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kHaierACStateLength`,
|  | const uint16_t | repeat = `kHaierAcDefaultRepeat`
| ) |  |

Send a Haier A/C formatted message. (HSU07-HEA03 remote) Status: STABLE / Known to be working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendHaierACYRW02()

void IRsend::sendHaierACYRW02 | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kHaierACYRW02StateLength`,
|  | const uint16_t | repeat = `kHaierAcYrw02DefaultRepeat`
| ) |  |

Send a Haier YR-W02 remote A/C formatted message. Status: Alpha / Untested on a real device.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendHitachiAC()

void IRsend::sendHitachiAC | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kHitachiAcStateLength`,
|  | const uint16_t | repeat = `kHitachiAcDefaultRepeat`
| ) |  |

Send a Hitachi 28-byte/224-bit A/C formatted message. (HITACHI_AC) Status: STABLE / Working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

See also
  https://github.com/crankyoldgit/IRremoteESP8266/issues/417

## sendHitachiAC1()

void IRsend::sendHitachiAC1 | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kHitachiAc1StateLength`,
|  | const uint16_t | repeat = `kHitachiAcDefaultRepeat`
| ) |  |

Send a Hitachi 13 byte/224-bit A/C formatted message. (HITACHI_AC1) Status: STABLE / Confirmed Working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

Note
  Basically the same as sendHitatchiAC() except different size & header.

See also
  https://github.com/crankyoldgit/IRremoteESP8266/issues/453

## sendHitachiAC2()

void IRsend::sendHitachiAC2 | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kHitachiAc2StateLength`,
|  | const uint16_t | repeat = `kHitachiAcDefaultRepeat`
| ) |  |

Send a Hitachi 53 byte/424-bit A/C formatted message. (HITACHI_AC2) Basically the same as sendHitatchiAC() except different size. Status: STABLE / Expected to work.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendHitachiAc3()

void IRsend::sendHitachiAc3 | ( | const unsigned char | data[],
|  | const uint16_t | nbytes,
|  | const uint16_t | repeat = `kHitachiAcDefaultRepeat`
| ) |  |

Send a Hitachi(3) A/C formatted message. (HITACHI_AC3) Status: STABLE / Working fine.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

Note
  This protocol is almost exactly the same as HitachiAC424 except this variant has subtle timing differences. There are five(5) typical sizes: kHitachiAc3MinStateLength (Cancel Timer), kHitachiAc3MinStateLength + 2 (Change Temp), kHitachiAc3StateLength - 6 (Change Mode), kHitachiAc3StateLength - 4 (Normal), & kHitachiAc3StateLength (Set Timer)

## sendHitachiAc344()

void IRsend::sendHitachiAc344 | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kHitachiAc344StateLength`,
|  | const uint16_t | repeat = `kHitachiAcDefaultRepeat`
| ) |  |

Send a Hitachi A/C 43-byte/344-bit message. (HITACHI_AC344) Basically the same as sendHitatchiAC() except different size. Status: Beta / Probably works.

Parameters

  [in] | data | An array of bytes containing the IR command.
  [in] | nbytes | Nr. of bytes of data in the array.
  [in] | repeat | Nr. of times the message is to be repeated. (Default = 0).

See also
  https://github.com/crankyoldgit/IRremoteESP8266/issues/1134

## sendHitachiAc424()

void IRsend::sendHitachiAc424 | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kHitachiAc424StateLength`,
|  | const uint16_t | repeat = `kHitachiAcDefaultRepeat`
| ) |  |

Send a Hitachi 53-byte/424-bit A/C formatted message. (HITACHI_AC424) Status: STABLE / Reported as working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

Note
  This protocol is almost exactly the same as HitachiAC2 except this variant has a leader section as well, and subtle timing differences. It is also in LSBF order (per byte), rather than MSBF order.

## sendInax()

void IRsend::sendInax | ( | const uint64_t | data,
|  | const uint16_t | nbits = `kInaxBits`,
|  | const uint16_t | repeat = `kInaxMinRepeat`
| ) |  |

Send a Inax Toilet formatted message. Status: STABLE / Working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

See also
  https://github.com/crankyoldgit/IRremoteESP8266/issues/706

## sendJVC()

void IRsend::sendJVC | ( | uint64_t | data,
|  | uint16_t | nbits = `kJvcBits`,
|  | uint16_t | repeat = `kNoRepeat`
| ) |  |

Send a JVC formatted message. Status: STABLE / Working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

See also
  http://www.sbprojects.com/knowledge/ir/jvc.php

## sendKelvinator()

void IRsend::sendKelvinator | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kKelvinatorStateLength`,
|  | const uint16_t | repeat = `kKelvinatorDefaultRepeat`
| ) |  |

Send a Kelvinator A/C message. Status: STABLE / Known working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendLasertag()

void IRsend::sendLasertag | ( | uint64_t | data,
|  | uint16_t | nbits = `kLasertagBits`,
|  | uint16_t | repeat = `kLasertagMinRepeat`
| ) |  |

Send a Lasertag packet/message. Status: STABLE / Working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

Note
  This protocol is pretty much just raw Manchester encoding.

Todo:
  Convert this to use `sendManchester()` if we can.`

## sendLegoPf()

void IRsend::sendLegoPf | ( | const uint64_t | data,
|  | const uint16_t | nbits = `kLegoPfBits`,
|  | const uint16_t | repeat = `kLegoPfMinRepeat`
| ) |  |

Send a LEGO Power Functions message. Status: Beta / Should work.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

Note
  Non-zero repeats results in at least 5 messages per spec.

## sendLG()

void IRsend::sendLG | ( | uint64_t | data,
|  | uint16_t | nbits = `kLgBits`,
|  | uint16_t | repeat = `kNoRepeat`
| ) |  |

Send an LG formatted message. (LG) Status: Beta / Should be working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent. Typically kLgBits or kLg32Bits.
  [in] | repeat | The number of times the command is to be repeated.

Note
  LG has a separate message to indicate a repeat, like NEC does.

## sendLG2()

void IRsend::sendLG2 | ( | uint64_t | data,
|  | uint16_t | nbits = `kLgBits`,
|  | uint16_t | repeat = `kNoRepeat`
| ) |  |

Send an LG Variant-2 formatted message. (LG2) Status: Beta / Should be working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent. Typically kLgBits or kLg32Bits.
  [in] | repeat | The number of times the command is to be repeated.

Note
  LG has a separate message to indicate a repeat, like NEC does.

## sendLutron()

void IRsend::sendLutron | ( | uint64_t | data,
|  | uint16_t | nbits = `kLutronBits`,
|  | uint16_t | repeat = `kNoRepeat`
| ) |  |

Send a Lutron formatted message. Status: Stable / Appears to be working for real devices.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

Note
  The protocol is really 36 bits long, but the first bit is always a 1. So, assume the 1 and only have a normal payload of 35 bits.

See also
  https://github.com/crankyoldgit/IRremoteESP8266/issues/515

## sendMagiQuest()

void IRsend::sendMagiQuest | ( | const uint64_t | data,
|  | const uint16_t | nbits = `kMagiquestBits`,
|  | const uint16_t | repeat = `kNoRepeat`
| ) |  |

Send a MagiQuest formatted message. Status: Beta / Should be working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendManchester()

void IRsend::sendManchester | ( | const uint16_t | headermark,
|  | const uint32_t | headerspace,
|  | const uint16_t | half_period,
|  | const uint16_t | footermark,
|  | const uint32_t | gap,
|  | const uint64_t | data,
|  | const uint16_t | nbits,
|  | const uint16_t | frequency = `38`,
|  | const bool | MSBfirst = `true`,
|  | const uint16_t | repeat = `kNoRepeat`,
|  | const uint8_t | dutycycle = `kDutyDefault`,
|  | const bool | GEThomas = `true`
| ) |  |

Generic method for sending Manchester code messages. Will send leading or trailing 0's if the nbits is larger than the number.

Parameters

  [in] | headermark | Nr. of usecs for the led to be pulsed for the header mark. A value of 0 means no header mark.
  [in] | headerspace | Nr. of usecs for the led to be off after the header mark. A value of 0 means no header space.
  [in] | half_period | Nr. of uSeconds for half the clock's period. (1/2 wavelength)
  [in] | footermark | Nr. of usecs for the led to be pulsed for the footer mark. A value of 0 means no footer mark.
  [in] | gap | Min. nr. of usecs for the led to be off after the footer mark. This is effectively the absolute minimum gap between messages.
  [in] | data | The data to be transmitted.
  [in] | nbits | Nr. of bits of data to be sent.
  [in] | frequency | The frequency we want to modulate at. (Hz/kHz)
  [in] | MSBfirst | Flag for bit transmission order. Defaults to MSB->LSB order.
  [in] | repeat | Nr. of extra times the message will be sent. e.g. 0 = 1 message sent, 1 = 1 initial + 1 repeat = 2 messages
  [in] | dutycycle | Percentage duty cycle of the LED. e.g. 25 = 25% = 1/4 on, 3/4 off. If you are not sure, try 50 percent.
  [in] | GEThomas | Use G.E. Thomas (true/default) or IEEE 802.3 (false).

Note
  Assumes a frequency < 1000 means kHz otherwise it is in Hz. Most common value is 38000 or 38, for 38kHz.

## sendManchesterData()

void IRsend::sendManchesterData | ( | const uint16_t | half_period,
|  | const uint64_t | data,
|  | const uint16_t | nbits,
|  | const bool | MSBfirst = `true`,
|  | const bool | GEThomas = `true`
| ) |  |

Generic method for sending Manchester code data. Will send leading or trailing 0's if the nbits is larger than the number of bits in data.

Parameters

  [in] | half_period | Nr. of uSeconds for half the clock's period. (1/2 wavelength)
  [in] | data | The data to be transmitted.
  [in] | nbits | Nr. of bits of data to be sent.
  [in] | MSBfirst | Flag for bit transmission order. Defaults to MSB->LSB order.
  [in] | GEThomas | Use G.E. Thomas (true/default) or IEEE 802.3 (false).

## sendMetz()

void IRsend::sendMetz | ( | const uint64_t | data,
|  | const uint16_t | nbits = `kMetzBits`,
|  | const uint16_t | repeat = `kMetzMinRepeat`
| ) |  |

Send a Metz formatted message. Status: Beta / Needs testing against a real device.

Parameters

  [in] | data | containing the IR command.
  [in] | nbits | Nr. of bits to send. usually kMetzBits
  [in] | repeat | Nr. of times the message is to be repeated.

## sendMidea()

void IRsend::sendMidea | ( | uint64_t | data,
|  | uint16_t | nbits = `kMideaBits`,
|  | uint16_t | repeat = `kMideaMinRepeat`
| ) |  |

Send a Midea message Status: Alpha / Needs testing against a real device.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendMidea24()

void IRsend::sendMidea24 | ( | const uint64_t | data,
|  | const uint16_t | nbits = `kMidea24Bits`,
|  | const uint16_t | repeat = `kMidea24MinRepeat`
| ) |  |

Send a Midea24 formatted message. Status: STABLE / Confirmed working on a real device.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

See also
  https://github.com/crankyoldgit/IRremoteESP8266/issues/1170

Note
  This protocol is basically a 48-bit version of the NEC protocol with alternate bytes inverted, thus only 24 bits of real data, and with at least a single repeat.

Warning
  Can't be used beyond 32 bits.

## sendMirage()

void IRsend::sendMirage | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kMirageStateLength`,
|  | const uint16_t | repeat = `kMirageMinRepeat`
| ) |  |

Send a Mirage formatted message. Status: STABLE / Reported as working.

Parameters

  [in] | data | An array of bytes containing the IR command.
  [in] | nbytes | Nr. of bytes of data in the array. (>=kMirageStateLength)
  [in] | repeat | Nr. of times the message is to be repeated.

## sendMitsubishi()

void IRsend::sendMitsubishi | ( | uint64_t | data,
|  | uint16_t | nbits = `kMitsubishiBits`,
|  | uint16_t | repeat = `kMitsubishiMinRepeat`
| ) |  |

Send the supplied Mitsubishi 16-bit message. Status: STABLE / Working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

Note
  This protocol appears to have no header.

See also
  https://github.com/marcosamarinho/IRremoteESP8266/blob/master/ir_Mitsubishi.cpp
  GlobalCache's Control Tower's Mitsubishi TV data.

## sendMitsubishi112()

void IRsend::sendMitsubishi112 | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kMitsubishi112StateLength`,
|  | const uint16_t | repeat = `kMitsubishi112MinRepeat`
| ) |  |

Send a Mitsubishi 112-bit A/C formatted message. (MITSUBISHI112) Status: Stable / Reported as working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

See also
  https://github.com/crankyoldgit/IRremoteESP8266/issues/947

## sendMitsubishi136()

void IRsend::sendMitsubishi136 | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kMitsubishi136StateLength`,
|  | const uint16_t | repeat = `kMitsubishi136MinRepeat`
| ) |  |

Send a Mitsubishi 136-bit A/C message. (MITSUBISHI136) Status: BETA / Probably working. Needs to be tested against a real device.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

See also
  https://github.com/crankyoldgit/IRremoteESP8266/issues/888

## sendMitsubishi2()

void IRsend::sendMitsubishi2 | ( | uint64_t | data,
|  | uint16_t | nbits = `kMitsubishiBits`,
|  | uint16_t | repeat = `kMitsubishiMinRepeat`
| ) |  |

Send a supplied second variant Mitsubishi 16-bit message. Status: BETA / Probably works.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

Note
  Based on a Mitsubishi HC3000 projector's remote. This protocol appears to have a mandatory in-protocol repeat. That is in addition to the entire message needing to be sent twice for the device to accept the command. That is separate from the repeat. i.e. Allegedly, the real remote requires the "Off" button pressed twice. You will need to add a suitable gap yourself.

See also
  https://github.com/crankyoldgit/IRremoteESP8266/issues/441

## sendMitsubishiAC()

void IRsend::sendMitsubishiAC | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kMitsubishiACStateLength`,
|  | const uint16_t | repeat = `kMitsubishiACMinRepeat`
| ) |  |

Send a Mitsubishi 144-bit A/C formatted message. (MITSUBISHI_AC) Status: STABLE / Working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendMitsubishiHeavy152()

void IRsend::sendMitsubishiHeavy152 | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kMitsubishiHeavy152StateLength`,
|  | const uint16_t | repeat = `kMitsubishiHeavy152MinRepeat`
| ) |  |

Send a MitsubishiHeavy 152-bit A/C message. Status: BETA / Appears to be working. Needs testing against a real device.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendMitsubishiHeavy88()

void IRsend::sendMitsubishiHeavy88 | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kMitsubishiHeavy88StateLength`,
|  | const uint16_t | repeat = `kMitsubishiHeavy88MinRepeat`
| ) |  |

Send a MitsubishiHeavy 88-bit A/C message. Status: BETA / Appears to be working. Needs testing against a real device.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendMultibrackets()

void IRsend::sendMultibrackets | ( | const uint64_t | data,
|  | const uint16_t | nbits = `kMultibracketsBits`,
|  | const uint16_t | repeat = `kMultibracketsDefaultRepeat`
| ) |  |

Send a Multibrackets formatted message. Status: BETA / Appears to be working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendMWM()

void IRsend::sendMWM | ( | const unsigned char | data[],
|  | const uint16_t | nbytes,
|  | const uint16_t | repeat = `kNoRepeat`
| ) |  |

Send a MWM packet/message. Status: Implemented.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

Note
  This protocol is 2400 bps serial, 1 start bit (mark), 1 stop bit (space), no parity

## sendNEC()

void IRsend::sendNEC | ( | uint64_t | data,
|  | uint16_t | nbits = `kNECBits`,
|  | uint16_t | repeat = `kNoRepeat`
| ) |  |

Send a raw NEC(Renesas) formatted message. Status: STABLE / Known working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

Note
  This protocol appears to have no header.

See also
  http://www.sbprojects.com/knowledge/ir/nec.php

## sendNeoclima()

void IRsend::sendNeoclima | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kNeoclimaStateLength`,
|  | const uint16_t | repeat = `kNeoclimaMinRepeat`
| ) |  |

Send a Neoclima message. Status: STABLE / Known to be working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendNikai()

void IRsend::sendNikai | ( | uint64_t | data,
|  | uint16_t | nbits = `kNikaiBits`,
|  | uint16_t | repeat = `kNoRepeat`
| ) |  |

Send a Nikai formatted message. Status: STABLE / Working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendPanasonic()

void IRsend::sendPanasonic | ( | const uint16_t | address,
|  | const uint32_t | data,
|  | const uint16_t | nbits = `kPanasonicBits`,
|  | const uint16_t | repeat = `kNoRepeat`
| ) |  |

Send a Panasonic formatted message. Status: STABLE, but DEPRECATED.

Deprecated:
  This is only for legacy use only, please use `sendPanasonic64()` instead.

Parameters

  [in] | address | The 16-bit manufacturer code.
  [in] | data | The 32-bit data portion of the message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

Note
  This protocol is a modified version of Kaseikyo.

## sendPanasonic64()

void IRsend::sendPanasonic64 | ( | const uint64_t | data,
|  | const uint16_t | nbits = `kPanasonicBits`,
|  | const uint16_t | repeat = `kNoRepeat`
| ) |  |

Send a Panasonic formatted message. Status: STABLE / Should be working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

Note
  This protocol is a modified version of Kaseikyo.
  Use this method if you want to send the results of `decodePanasonic`.

## sendPanasonicAC()

void IRsend::sendPanasonicAC | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kPanasonicAcStateLength`,
|  | const uint16_t | repeat = `kPanasonicAcDefaultRepeat`
| ) |  |

Send a Panasonic A/C message. Status: STABLE / Work with real device(s).

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendPanasonicAC32()

void IRsend::sendPanasonicAC32 | ( | const uint64_t | data,
|  | const uint16_t | nbits = `kPanasonicAc32Bits`,
|  | const uint16_t | repeat = `kPanasonicAcDefaultRepeat`
| ) |  |

Send a Panasonic AC 32/16bit formatted message. Status: STABLE / Confirmed working.

Parameters

  [in] | data | containing the IR command.
  [in] | nbits | Nr. of bits to send. Usually kPanasonicAc32Bits
  [in] | repeat | Nr. of times the message is to be repeated.

See also
  https://github.com/crankyoldgit/IRremoteESP8266/issues/1307

## sendPioneer()

void IRsend::sendPioneer | ( | const uint64_t | data,
|  | const uint16_t | nbits = `kPioneerBits`,
|  | const uint16_t | repeat = `kNoRepeat`
| ) |  |

Send a raw Pioneer formatted message. Status: STABLE / Expected to be working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendPronto()

void IRsend::sendPronto | ( | uint16_t | data[],
|  | uint16_t | len,
|  | uint16_t | repeat = `kNoRepeat`
| ) |  |

Send a Pronto Code formatted message. Status: STABLE / Known working.

Parameters

  [in] | data | An array of uint16_t containing the pronto codes.
  [in] | len | Nr. of entries in the data[] array.
  [in] | repeat | Nr. of times to repeat the message.

Note
  Pronto codes are typically represented in hexadecimal. You will need to convert the code to an array of integers, and calculate it's length. e.g.
  A Sony 20 bit DVD remote command.
  "0000 0067 0000 0015 0060 0018 0018 0018 0030 0018 0030 0018 0030 0018
  0018 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0030 0018
  0030 0018 0030 0018 0018 0018 0018 0018 0030 0018 0018 0018 0018 0018
  0030 0018 0018 03f6"
  converts to:
  uint16_t prontoCode[46] = {
  0x0000, 0x0067, 0x0000, 0x0015,
  0x0060, 0x0018, 0x0018, 0x0018, 0x0030, 0x0018, 0x0030, 0x0018,
  0x0030, 0x0018, 0x0018, 0x0018, 0x0030, 0x0018, 0x0018, 0x0018,
  0x0018, 0x0018, 0x0030, 0x0018, 0x0018, 0x0018, 0x0030, 0x0018,
  0x0030, 0x0018, 0x0030, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018,
  0x0030, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0030, 0x0018,
  0x0018, 0x03f6};
  // Send the Pronto(Sony) code. Repeat twice as Sony's require that.
  sendPronto(prontoCode, 46, kSonyMinRepeat);

See also
  http://www.etcwiki.org/wiki/Pronto_Infrared_Format
  http://www.remotecentral.com/features/irdisp2.htm

## sendRaw()

void IRsend::sendRaw | ( | const uint16_t | buf[],
|  | const uint16_t | len,
|  | const uint16_t | hz
| ) |  |

Send a raw IRremote message.

Parameters

  [in] | buf | An array of uint16_t's that has microseconds elements.
  [in] | len | Nr. of elements in the buf[] array.
  [in] | hz | Frequency to send the message at. (kHz < 1000; Hz >= 1000)

Note
  Even elements are Mark times (On), Odd elements are Space times (Off). Ref: examples/IRrecvDumpV2/IRrecvDumpV2.ino (or later)

## sendRC5()

void IRsend::sendRC5 | ( | const uint64_t | data,
|  | uint16_t | nbits = `kRC5XBits`,
|  | const uint16_t | repeat = `kNoRepeat`
| ) |  |

Send a Philips RC-5/RC-5X packet. Status: RC-5 (stable), RC-5X (alpha)

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

Note
  Caller needs to take care of flipping the toggle bit. That bit differentiates between key press & key release. For RC-5 it is the MSB of the data. For RC-5X it is the 2nd MSB of the data.

Todo:
  Testing of the RC-5X components.

## sendRC6()

void IRsend::sendRC6 | ( | const uint64_t | data,
|  | const uint16_t | nbits = `kRC6Mode0Bits`,
|  | const uint16_t | repeat = `kNoRepeat`
| ) |  |

Send a Philips RC-6 packet. Status: Stable.

Note
  Caller needs to take care of flipping the toggle bit (The 4th Most Significant Bit). That bit differentiates between key press & key release.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendRCMM()

void IRsend::sendRCMM | ( | uint64_t | data,
|  | uint16_t | nbits = `kRCMMBits`,
|  | uint16_t | repeat = `kNoRepeat`
| ) |  |

Send a Philips RC-MM packet. Status: STABLE / Should be working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendSAMSUNG()

void IRsend::sendSAMSUNG | ( | const uint64_t | data,
|  | const uint16_t | nbits = `kSamsungBits`,
|  | const uint16_t | repeat = `kNoRepeat`
| ) |  |

Send a 32-bit Samsung formatted message. Status: STABLE / Should be working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

See also
  http://elektrolab.wz.cz/katalog/samsung_protocol.pdf

Note
  Samsung has a separate message to indicate a repeat, like NEC does.

Todo:
  Confirm that is actually how Samsung sends a repeat. The refdoc doesn't indicate it is true.

## sendSamsung36()

void IRsend::sendSamsung36 | ( | const uint64_t | data,
|  | const uint16_t | nbits = `kSamsung36Bits`,
|  | const uint16_t | repeat = `kNoRepeat`
| ) |  |

Send a Samsung 36-bit formatted message. Status: STABLE / Works on real devices.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

See also
  https://github.com/crankyoldgit/IRremoteESP8266/issues/621

## sendSamsungAC()

void IRsend::sendSamsungAC | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kSamsungAcStateLength`,
|  | const uint16_t | repeat = `kSamsungAcDefaultRepeat`
| ) |  |

Send a Samsung A/C message. Status: Stable / Known working.

See also
  https://github.com/crankyoldgit/IRremoteESP8266/issues/505

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendSanyoAc()

void IRsend::sendSanyoAc | ( | const uint8_t * | data,
|  | const uint16_t | nbytes = `kSanyoAcStateLength`,
|  | const uint16_t | repeat = `kNoRepeat`
| ) |  |

Send a SanyoAc formatted message. Status: STABLE / Reported as working.

Parameters

  [in] | data | An array of bytes containing the IR command.
  [in] | nbytes | Nr. of bytes of data in the array.
  [in] | repeat | Nr. of times the message is to be repeated.

See also
  https://github.com/crankyoldgit/IRremoteESP8266/issues/1211

## sendSanyoLC7461()

void IRsend::sendSanyoLC7461 | ( | const uint64_t | data,
|  | const uint16_t | nbits = `kSanyoLC7461Bits`,
|  | const uint16_t | repeat = `kNoRepeat`
| ) |  |

Send a Sanyo LC7461 message. Status: BETA / Probably works.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

Note
  Based on @marcosamarinho's work. This protocol uses the NEC protocol timings. However, data is formatted as : address(13 bits), !address, command (8 bits), !command. According with LIRC, this protocol is used on Sanyo, Aiwa and Chinon Information for this protocol is available at the Sanyo LC7461 datasheet. Repeats are performed similar to the NEC method of sending a special repeat message, rather than duplicating the entire message.

See also
  https://github.com/marcosamarinho/IRremoteESP8266/blob/master/ir_Sanyo.cpp
  http://pdf.datasheetcatalog.com/datasheet/sanyo/LC7461.pdf

## sendSharp()

void IRsend::sendSharp | ( | const uint16_t | address,
|  | const uint16_t | command,
|  | const uint16_t | nbits = `kSharpBits`,
|  | const uint16_t | repeat = `kNoRepeat`
| ) |  |

Send a Sharp message Status: DEPRECATED / Previously working fine.

Deprecated:
  Only use this if you are using legacy from the original Arduino-IRremote library. 99% of the time, you will want to use `sendSharpRaw()` instead

Parameters

  [in] | address | Address value to be sent.
  [in] | command | Command value to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

Note
  This procedure has a non-standard invocation style compared to similar sendProtocol() routines. This is due to legacy, compatibility, & historic reasons. Normally the calling syntax version is like sendSharpRaw(). This procedure transmits the address & command in MSB first order, which is incorrect. This behaviour is left as-is to maintain backward compatibility with legacy code. In short, you should use sendSharpRaw(), encodeSharp(), and the correct values of address & command instead of using this, & the wrong values.

## sendSharpAc()

void IRsend::sendSharpAc | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kSharpAcStateLength`,
|  | const uint16_t | repeat = `kSharpAcDefaultRepeat`
| ) |  |

Send a Sharp A/C message. Status: Alpha / Untested.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

See also
  https://github.com/crankyoldgit/IRremoteESP8266/issues/638
  https://github.com/ToniA/arduino-heatpumpir/blob/master/SharpHeatpumpIR.cpp

## sendSharpRaw()

void IRsend::sendSharpRaw | ( | const uint64_t | data,
|  | const uint16_t | nbits = `kSharpBits`,
|  | const uint16_t | repeat = `kNoRepeat`
| ) |  |

Send a (raw) Sharp message.

Note
  Status: STABLE / Working fine.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

Note
  his procedure handles the inversion of bits required per protocol. The protocol spec says to send the LSB first, but legacy code & usage has us sending the MSB first. Grrrr. Normal invocation of encodeSharp() handles this for you, assuming you are using the correct/standard values. e.g. sendSharpRaw(encodeSharp(address, command));

## sendSherwood()

void IRsend::sendSherwood | ( | uint64_t | data,
|  | uint16_t | nbits = `kSherwoodBits`,
|  | uint16_t | repeat = `kSherwoodMinRepeat`
| ) |  |

Send an IR command to a Sherwood device. Status: STABLE / Known working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

Note
  Sherwood remote codes appear to be NEC codes with a mandatory repeat code. i.e. repeat should be >= kSherwoodMinRepeat (1).

## sendSony()

void IRsend::sendSony | ( | const uint64_t | data,
|  | const uint16_t | nbits = `kSony20Bits`,
|  | const uint16_t | repeat = `kSonyMinRepeat`
| ) |  |

Send a standard Sony/SIRC(Serial Infra-Red Control) message. (40kHz) Status: STABLE / Known working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

Note
  sendSony() should typically be called with repeat=2 as Sony devices expect the message to be sent at least 3 times.

## sendSony38()

void IRsend::sendSony38 | ( | const uint64_t | data,
|  | const uint16_t | nbits = `kSony20Bits`,
|  | const uint16_t | repeat = `kSonyMinRepeat + 1`
| ) |  |

Send an alternative 38kHz Sony/SIRC(Serial Infra-Red Control) message. Status: STABLE / Known working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

Note
  `sendSony38()` should typically be called with repeat=3 as these Sony devices expect the message to be sent at least 4 times.

Warning
  Messages send via this method will be detected by this library as just `SONY`, not `SONY_38K` as the library has no way to determine the modulation frequency used. Hence, there is no `decodeSony38()`.

See also
  https://github.com/crankyoldgit/IRremoteESP8266/issues/1018

## sendSymphony()

void IRsend::sendSymphony | ( | uint64_t | data,
|  | uint16_t | nbits = `kSymphonyBits`,
|  | uint16_t | repeat = `kSymphonyDefaultRepeat`
| ) |  |

Send a Symphony packet. Status: STABLE / Should be working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendTcl112Ac()

void IRsend::sendTcl112Ac | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kTcl112AcStateLength`,
|  | const uint16_t | repeat = `kTcl112AcDefaultRepeat`
| ) |  |

Send a TCL 112-bit A/C message. Status: Beta / Probably working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendTechnibelAc()

void IRsend::sendTechnibelAc | ( | uint64_t | data,
|  | uint16_t | nbits = `kTechnibelAcBits`,
|  | uint16_t | repeat = `kTechnibelAcDefaultRepeat`
| ) |  |

Send an Technibel AC formatted message. Status: STABLE / Reported as working on a real device.

Parameters

  [in] | data | containing the IR command.
  [in] | nbits | Nr. of bits to send. usually kTechnibelAcBits
  [in] | repeat | Nr. of times the message is to be repeated.

## sendTeco()

void IRsend::sendTeco | ( | const uint64_t | data,
|  | const uint16_t | nbits = `kTecoBits`,
|  | const uint16_t | repeat = `kNoRepeat`
| ) |  |

Send a Teco A/C message. Status: Beta / Probably working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendToshibaAC()

void IRsend::sendToshibaAC | ( | const uint8_t | data[],
|  | const uint16_t | nbytes = `kToshibaACStateLength`,
|  | const uint16_t | repeat = `kToshibaACMinRepeat`
| ) |  |

Send a Toshiba A/C message. Status: STABLE / Working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendTranscold()

void IRsend::sendTranscold | ( | const uint64_t | data,
|  | const uint16_t | nbits = `kTranscoldBits`,
|  | const uint16_t | repeat = `kTranscoldDefaultRepeat`
| ) |  |

Send a Transcold message Status: STABLE / Confirmed Working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendTrotec()

void IRsend::sendTrotec | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kTrotecStateLength`,
|  | const uint16_t | repeat = `kTrotecDefaultRepeat`
| ) |  |

Send a Trotec message. Status: Beta / Probably Working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendVestelAc()

void IRsend::sendVestelAc | ( | const uint64_t | data,
|  | const uint16_t | nbits = `kVestelAcBits`,
|  | const uint16_t | repeat = `kNoRepeat`
| ) |  |

Send a Vestel message Status: STABLE / Working.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendVoltas()

void IRsend::sendVoltas | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kVoltasStateLength`,
|  | const uint16_t | repeat = `kNoRepeat`
| ) |  |

Send a Voltas formatted message. Status: STABLE / Working on real device.

Parameters

  [in] | data | An array of bytes containing the IR command. It is assumed to be in MSB order for this code. e.g. uint8_t data[kVoltasStateLength] = {0x33, 0x28, 0x88, 0x1A, 0x3B, 0x3B, 0x3B, 0x11, 0x00, 0x40};
  [in] | nbytes | Nr. of bytes of data in the array. (>=kVoltasStateLength)
  [in] | repeat | Nr. of times the message is to be repeated.

## sendWhirlpoolAC()

void IRsend::sendWhirlpoolAC | ( | const unsigned char | data[],
|  | const uint16_t | nbytes = `kWhirlpoolAcStateLength`,
|  | const uint16_t | repeat = `kWhirlpoolAcDefaultRepeat`
| ) |  |

Send a Whirlpool A/C message. Status: BETA / Probably works.

Parameters

  [in] | data | The message to be sent.
  [in] | nbytes | The number of bytes of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

## sendWhynter()

void IRsend::sendWhynter | ( | const uint64_t | data,
|  | const uint16_t | nbits = `kWhynterBits`,
|  | const uint16_t | repeat = `kNoRepeat`
| ) |  |

Send a Whynter message. Status: STABLE.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The number of bits of message to be sent.
  [in] | repeat | The number of times the command is to be repeated.

See also
  https://github.com/z3t0/Arduino-IRremote/blob/master/ir_Whynter.cpp

## sendZepeal()

void IRsend::sendZepeal | ( | const uint64_t | data,
|  | const uint16_t | nbits = `kZepealBits`,
|  | const uint16_t | repeat = `kZepealMinRepeat`
| ) |  |

Send a Zepeal formatted message. Status: STABLE / Works on real device.

Parameters

  [in] | data | The message to be sent.
  [in] | nbits | The bit size of the message being sent.
  [in] | repeat | The number of times the message is to be repeated.

## space()

void IRsend::space | ( | uint32_t | time | ) |

Turn the pin (LED) off for a given time. Sends an IR space for the specified number of microseconds. A space is no output, so the PWM output is disabled.

Parameters

  [in] | time | Time in microseconds (us).

## toggleRC5()

uint64_t IRsend::toggleRC5 | ( | const uint64_t | data | ) |

Flip the toggle bit of a Philips RC-5/RC-5X data message. Used to indicate a change of remote button's state. Status: STABLE.

Parameters

  [in] | data | The existing RC-5/RC-5X message.

Returns
  A data message suitable for use in sendRC5() with the toggle bit flipped.

## toggleRC6()

uint64_t IRsend::toggleRC6 | ( | const uint64_t | data,
|  | const uint16_t | nbits = `kRC6Mode0Bits`
| ) |  |

Flip the toggle bit of a Philips RC-6 data message. Used to indicate a change of remote button's state. Status: STABLE / Should work fine.

Parameters

  [in] | data | The existing RC-6 message.
  [in] | nbits | Nr. of bits in the RC-6 protocol.

Returns
  A data message suitable for use in sendRC6() with the toggle bit flipped.

Note
  For RC-6 (20-bits), it is the 17th least significant bit.
  For RC-6 (36-bits/Xbox-360), it is the 16th least significant bit.

## Member Data Documentation

## _dutycycle

uint8_t IRsend::_dutycycle

private

## _freq_unittest

uint32_t IRsend::_freq_unittest

private

## IRpin

uint16_t IRsend::IRpin

private

## modulation

bool IRsend::modulation

private

## offTimePeriod

uint16_t IRsend::offTimePeriod

private

## onTimePeriod

uint16_t IRsend::onTimePeriod

private

## outputOff

uint8_t IRsend::outputOff

protected

## outputOn

uint8_t IRsend::outputOn

protected

## periodOffset

int8_t IRsend::periodOffset

private

The documentation for this class was generated from the following files:

- src/IRsend.h
- src/ir_Airwell.cpp
- src/ir_Aiwa.cpp
- src/ir_Amcor.cpp
- src/ir_Argo.cpp
- src/ir_Carrier.cpp
- src/ir_Coolix.cpp
- src/ir_Corona.cpp
- src/ir_Daikin.cpp
- src/ir_Delonghi.cpp
- src/ir_Denon.cpp
- src/ir_Dish.cpp
- src/ir_Doshisha.cpp
- src/ir_Electra.cpp
- src/ir_EliteScreens.cpp
- src/ir_Epson.cpp
- src/ir_Fujitsu.cpp
- src/ir_GICable.cpp
- src/ir_GlobalCache.cpp
- src/ir_Goodweather.cpp
- src/ir_Gree.cpp
- src/ir_Haier.cpp
- src/ir_Hitachi.cpp
- src/ir_Inax.cpp
- src/ir_JVC.cpp
- src/ir_Kelvinator.cpp
- src/ir_Lasertag.cpp
- src/ir_Lego.cpp
- src/ir_LG.cpp
- src/ir_Lutron.cpp
- src/ir_Magiquest.cpp
- src/ir_Metz.cpp
- src/ir_Midea.cpp
- src/ir_Mirage.cpp
- src/ir_Mitsubishi.cpp
- src/ir_MitsubishiHeavy.cpp
- src/ir_Multibrackets.cpp
- src/ir_MWM.cpp
- src/ir_NEC.cpp
- src/ir_Neoclima.cpp
- src/ir_Nikai.cpp
- src/ir_Panasonic.cpp
- src/ir_Pioneer.cpp
- src/ir_Pronto.cpp
- src/ir_RC5_RC6.cpp
- src/ir_RCMM.cpp
- src/ir_Samsung.cpp
- src/ir_Sanyo.cpp
- src/ir_Sharp.cpp
- src/ir_Sherwood.cpp
- src/ir_Sony.cpp
- src/ir_Symphony.cpp
- src/ir_Tcl.cpp
- src/ir_Technibel.cpp
- src/ir_Teco.cpp
- src/ir_Toshiba.cpp
- src/ir_Transcold.cpp
- src/ir_Trotec.cpp
- src/ir_Vestel.cpp
- src/ir_Voltas.cpp
- src/ir_Whirlpool.cpp
- src/ir_Whynter.cpp
- src/ir_Zepeal.cpp
- src/IRsend.cpp

IRsend::sendPronto
void sendPronto(uint16_t data[], uint16_t len, uint16_t repeat=kNoRepeat)
Send a Pronto Code formatted message. Status: STABLE / Known working.
Definition: ir_Pronto.cpp:56
kVoltasStateLength
const uint16_t kVoltasStateLength
Definition: IRremoteESP8266.h:1096
kCoronaAcStateLength
const uint16_t kCoronaAcStateLength
Definition: IRremoteESP8266.h:898
kSonyMinRepeat
const uint16_t kSonyMinRepeat
Definition: IRremoteESP8266.h:1068