Skip to content

Instantly share code, notes, and snippets.

@Keeo
Created December 7, 2019 17:47
Show Gist options
  • Save Keeo/05d2f27e5a8c4b9969b83112c7e17c95 to your computer and use it in GitHub Desktop.
Save Keeo/05d2f27e5a8c4b9969b83112c7e17c95 to your computer and use it in GitHub Desktop.
IR Codes for fan
#
# https://www.sbprojects.net/knowledge/ir/nec.php
#
Power On/Off
Protocol : NEC
Code : 0xFFA25D (32 Bits)
uint16_t rawData[71] = {9058, 4466, 596, 534, 596, 538, 596, 538, 596, 538, 596, 538, 596, 538, 596, 538, 596, 538, 596, 1648, 596, 1652, 596, 1652, 596, 1652, 596, 1648, 596, 1652, 596, 1652, 596, 1652, 596, 1652, 596, 538, 596, 1652, 596, 538, 596, 538, 590, 538, 596, 1652, 596, 538, 596, 538, 596, 1652, 596, 538, 596, 1648, 600, 1648, 594, 1652, 596, 538, 596, 1652, 596, 40234, 9064, 2196, 596}; // NEC FFA25D
uint32_t address = 0x0;
uint32_t command = 0x45;
uint64_t data = 0xFFA25D;
Speed toggle
Protocol : NEC
Code : 0xFFE21D (32 Bits)
uint16_t rawData[71] = {9058, 4462, 600, 534, 596, 538, 596, 538, 596, 538, 596, 534, 596, 538, 596, 538, 596, 538, 596, 1652, 596, 1648, 600, 1648, 596, 1652, 596, 1648, 600, 1648, 596, 1652, 596, 1652, 596, 1648, 600, 1648, 600, 1648, 596, 538, 596, 540, 596, 538, 596, 1652, 594, 540, 596, 538, 592, 538, 596, 538, 596, 1654, 596, 1652, 596, 1648, 596, 538, 596, 1652, 596, 40234, 9060, 2200, 596}; // NEC FFE21D
uint32_t address = 0x0;
uint32_t command = 0x47;
uint64_t data = 0xFFE21D;
Mode
Protocol : NEC
Code : 0xFF02FD (32 Bits)
uint16_t rawData[71] = {9090, 4436, 652, 482, 626, 510, 620, 514, 622, 512, 620, 508, 626, 508, 626, 508, 626, 508, 626, 1622, 652, 1596, 626, 1622, 626, 1622, 626, 1622, 626, 1622, 620, 1622, 650, 1598, 650, 484, 626, 508, 652, 484, 650, 482, 626, 508, 626, 508, 626, 1622, 620, 514, 622, 1622, 652, 1598, 624, 1624, 624, 1622, 626, 1622, 626, 1622, 626, 508, 626, 1622, 648, 40184, 9058, 2204, 592}; // NEC FF02FD
uint32_t address = 0x0;
uint32_t command = 0x40;
uint64_t data = 0xFF02FD;
Timer
Protocol : NEC
Code : 0xFF9867 (32 Bits)
uint16_t rawData[71] = {9062, 4464, 596, 538, 596, 538, 594, 538, 596, 538, 596, 538, 594, 538, 596, 538, 592, 542, 590, 1652, 594, 1652, 596, 1652, 596, 1652, 596, 1650, 596, 1652, 594, 1652, 596, 1652, 596, 1652, 594, 538, 596, 538, 594, 1652, 596, 1650, 596, 538, 596, 538, 596, 538, 596, 538, 596, 1648, 600, 1648, 598, 534, 600, 534, 596, 1652, 594, 1652, 596, 1652, 596, 39882, 9058, 2200, 600}; // NEC FF9867
uint32_t address = 0x0;
uint32_t command = 0x19;
Swing
Protocol : NEC
Code : 0xFF38C7 (32 Bits)
uint16_t rawData[71] = {9060, 4462, 626, 508, 626, 508, 624, 508, 626, 508, 626, 508, 650, 482, 626, 508, 626, 508, 652, 1596, 626, 1622, 622, 1626, 620, 1628, 624, 1618, 624, 1622, 626, 1622, 652, 1596, 652, 482, 626, 508, 652, 1596, 626, 1622, 622, 1622, 626, 508, 652, 482, 626, 510, 626, 1622, 650, 1596, 652, 482, 626, 508, 626, 508, 652, 1596, 626, 1622, 652, 1592, 652, 40182, 9060, 2200, 596}; // NEC FF38C7
uint32_t address = 0x0;
uint32_t command = 0x1C;
uint64_t data = 0xFF38C7;
uint64_t data = 0xFF9867;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment