Skip to content

Instantly share code, notes, and snippets.

@tiegz
Last active December 16, 2020 02:18
Show Gist options
  • Save tiegz/309d7fce65a6254662cb to your computer and use it in GitHub Desktop.
Save tiegz/309d7fce65a6254662cb to your computer and use it in GitHub Desktop.
APA 1616 LED Remote IR Codes
# http://sztyled.en.made-in-china.com/product/SqUmJxylhbhK/China-24-Key-Infrared-RGB-Manual-Flash-Controller-APA-1616-.html
# or
# http://www.dhgate.com/store/product/advanced-micro-control-unit-24-keys-rgb-led/128629434.html
IR Receiver Notes
F700FF BRIGHT HI
F7807F BRIGHT LO
F7408F OFF
F7C03F ON
F720DF R1
F710EF R2
F730CF R3
F708F7 R4
F728D7 R5
F7A05F G1
F7906F G2
F7B04F G3
F78877 G4
F7A857 G5
F7609F B1
F750AF B2
F74887 B3
F76897 B4
F7E01F W1
F7D02F FLASH
F7F00F STROBE
F7C837 FADE
F7E817 SMOOTH
FFFFFFFF HOLDING DOWN
# From LIRC config
Space/pulse encoded remote control found.
Signal length is 67.
Found possible header: 9037 4448
Found trail pulse: 604
Found repeat code: 9041 2213
Signals are space encoded.
Signal length is 32
Now enter the names for the buttons.
# Please make this file available to others
# by sending it to <[email protected]>
#
# this config file was automatically generated
# using lirc-0.9.0-pre1(default) on Wed Aug 12 23:38:21 2015
#
# contributed by
#
# brand: /home/pi/lircd.conf
# model no. of remote control:
# devices being controlled by this remote:
#
begin remote
name /home/pi/lircd.conf
name NEC
flags RAW_CODES|CONST_LENGTH
eps 30
aeps 100
gap 107680
begin raw_codes
name BRIGHTER
9039 4440 604 529 603 503
628 504 613 518 614 494
629 503 607 536 629 469
631 1629 598 1634 604 1634
628 1635 601 501 629 1633
605 1636 603 1650 609 501
605 530 597 507 625 503
603 529 603 504 629 503
604 529 599 1634 606 1629
629 1631 608 1633 595 1647
619 1632 603 1631 603 1634
627
name DARKER
9036 4440 601 530 603 504
637 519 577 532 599 505
627 510 597 533 596 504
627 1630 608 1628 607 1626
632 1633 603 504 631 1629
603 1632 603 1630 636 1626
607 499 629 504 603 534
600 500 630 503 605 523
604 503 632 502 603 1634
625 1632 604 1640 594 1631
633 1638 596 1629 607 1633
643
name OFF
9039 4437 604 533 601 502
629 507 597 531 599 505
628 502 604 533 635 471
632 1628 601 1628 604 1636
629 1631 603 506 628 1632
616 1620 608 1630 629 500
603 1629 628 509 609 520
604 503 628 502 604 528
604 504 629 1629 605 503
628 1632 603 1640 600 1628
631 1631 604 1634 604 1632
628
name ON
9039 4455 590 528 604 502
631 502 605 525 603 503
628 504 606 526 603 503
630 1629 606 1630 605 1629
629 1642 593 504 629 1635
600 1630 607 1627 633 1643
593 1631 603 529 603 504
628 504 602 530 604 498
630 503 621 513 602 503
629 1631 602 1633 603 1631
634 1639 597 1628 605 1631
629
name RED
9047 4432 606 538 595 501
631 502 604 528 603 502
632 497 604 528 606 501
629 1641 594 1630 605 1629
634 1631 605 502 629 1629
607 1634 600 1630 630 503
603 528 604 1630 604 530
603 503 629 503 600 532
602 503 628 1629 605 1632
608 539 591 1638 609 1617
634 1630 603 1631 633 1606
627
name GREEN
9045 4434 606 528 603 505
627 503 604 528 603 503
629 501 602 527 604 502
636 1625 609 1639 599 1625
633 1629 606 504 629 1627
608 1629 606 1635 637 1626
600 503 628 1634 610 505
623 498 604 528 608 500
632 500 608 527 600 1632
603 528 604 1631 607 1630
627 1639 604 1628 604 1639
625
name BLUE
9036 4444 609 527 600 502
629 502 598 531 603 504
629 503 603 529 603 503
629 1630 604 1640 594 1632
632 1627 607 504 627 1630
606 1638 597 1630 633 502
600 1632 633 1631 603 503
629 507 600 529 603 498
631 502 603 1632 633 498
604 529 604 1631 605 1630
632 1627 607 1631 602 1630
642
name WHITE
9035 4440 602 527 605 503
629 503 604 531 601 502
625 506 600 529 604 502
628 1644 593 1629 603 1635
631 1629 605 503 629 1650
585 1630 604 1628 632 1633
599 1636 603 1641 618 507
600 530 602 503 625 507
602 529 602 501 630 503
600 531 601 1633 604 1630
630 1631 603 1628 608 1634
628
name FLASH
9030 4454 592 528 603 505
627 504 603 529 599 503
629 503 604 527 608 498
633 1624 608 1631 603 1631
628 1655 602 481 651 1618
597 1629 603 1632 636 1625
606 1633 600 529 603 1630
605 530 602 503 629 499
603 530 603 502 629 503
602 1636 628 501 603 1631
628 1632 602 1634 602 1631
629
name STROBE
9024 4444 602 540 591 503
629 501 604 530 603 506
628 502 599 532 599 503
629 1638 597 1639 600 1630
629 1636 599 506 624 1647
594 1633 600 1637 628 1628
603 1633 615 1620 629 1629
602 505 629 504 602 529
618 494 626 504 600 531
597 503 626 507 603 1630
630 1635 604 1629 602 1633
628
name FADE
9035 4436 604 527 604 503
629 503 603 537 594 503
623 509 601 532 599 503
629 1631 604 1633 600 1640
627 1628 604 503 629 1631
602 1634 601 1643 621 1630
603 1629 610 529 600 502
628 1644 591 507 623 508
598 528 606 502 629 503
603 1631 629 1633 601 501
631 1635 601 1633 604 1629
630
name SMOOTH
9033 4439 605 530 601 504
624 508 602 540 656 444
629 497 602 528 598 508
625 1635 599 1633 606 1645
614 1631 603 503 629 1629
611 1629 599 1646 619 1631
603 1629 606 1633 630 502
608 1627 629 503 601 536
596 506 624 502 604 528
603 504 629 1641 592 503
631 1629 603 1631 603 1636
627
name BR1
9032 4443 602 528 603 501
632 503 603 535 593 502
633 502 601 529 603 502
629 1629 606 1630 629 1612
624 1633 602 505 628 1631
608 1634 597 1629 629 504
602 531 601 504 629 1634
603 504 627 501 602 538
592 520 638 1609 600 1633
601 1629 635 502 625 1608
631 1630 603 1629 606 1630
633
name BR2
9025 4455 591 534 598 502
630 503 603 529 599 508
622 505 603 529 603 504
625 1634 604 1635 599 1630
629 1634 599 516 617 1640
599 1627 606 1630 630 503
603 529 599 1637 602 1628
629 503 606 534 594 509
625 507 596 1637 628 1633
601 502 628 503 599 1651
618 1628 610 1623 602 1635
624
name BR3
9032 4436 608 526 606 500
631 501 599 531 614 501
617 507 600 533 633 468
637 1630 598 1642 592 1633
627 1629 603 503 631 1630
601 1636 599 1635 633 501
599 532 599 503 627 506
602 1631 629 502 604 529
608 499 624 1634 602 1633
603 1631 632 1629 602 506
628 1630 603 1631 604 1630
631
name BR4
9024 4449 601 531 599 502
624 508 600 532 600 507
631 497 599 548 583 509
625 1633 599 1637 597 1639
628 1630 599 507 623 1636
599 1635 597 1638 636 495
599 534 597 1635 600 534
597 1636 599 533 599 507
628 500 598 1635 628 1631
625 483 635 1626 603 501
654 1609 605 1628 605 1631
634
name BG1
9033 4444 598 532 598 507
625 509 608 523 599 502
626 507 597 537 600 508
623 1634 598 1635 608 1625
632 1636 597 507 624 1636
598 1634 608 1635 625 1629
602 503 629 503 606 1627
631 503 608 524 598 508
625 506 600 532 599 1635
601 1637 625 504 600 1634
625 1634 606 1629 604 1637
623
name BG2
9053 4429 604 524 608 498
634 499 602 530 603 503
629 503 603 529 603 503
640 1622 633 1603 601 1631
629 1630 608 503 639 1620
605 1629 603 1632 629 1635
606 502 629 1628 603 1632
603 528 604 502 631 503
603 529 604 510 622 1629
604 507 625 507 601 1638
626 1631 602 1645 593 1629
632
name BG3
9057 4425 632 497 600 508
625 507 600 527 604 502
629 504 599 533 599 504
632 1628 602 1633 602 1636
628 1630 605 503 629 1630
611 1623 604 1631 634 1630
600 507 624 508 598 529
612 1621 606 529 622 500
613 528 573 537 608 1623
624 1618 623 1629 603 503
641 1626 598 1630 603 1631
629
name BG4
9020 4443 606 531 600 507
625 510 597 532 599 506
625 506 602 532 612 505
618 1634 597 1637 598 1632
633 1635 610 496 628 1634
597 1634 601 1634 629 1635
611 496 624 1634 601 508
624 1635 603 503 631 504
602 528 608 500 629 1640
593 508 625 1634 603 503
628 1675 562 1634 604 1636
626
name BB1
9033 4443 595 530 603 502
632 498 599 533 599 503
629 503 603 528 606 502
628 1630 604 1630 604 1705
561 1630 603 502 628 1631
603 1638 594 1647 620 504
597 1636 628 503 599 1636
633 499 599 544 589 503
628 503 603 1630 628 505
603 1631 629 503 603 1637
625 1635 610 1622 603 1631
630
name BB2
9025 4465 587 533 595 512
619 502 604 528 604 503
629 503 600 532 600 502
630 1629 606 1652 582 1634
629 1643 592 505 628 1637
600 1637 593 1634 625 506
600 1638 631 1630 603 1631
601 530 602 507 625 507
604 524 598 1635 599 533
599 507 623 505 603 1631
631 1636 597 1634 603 1642
619
name BB3
9028 4444 600 533 625 482
620 508 599 531 601 507
623 507 600 533 595 511
621 1645 596 1639 595 1648
613 1633 599 507 630 1632
608 1630 598 1635 624 507
600 1634 627 506 600 532
607 1628 599 535 602 507
631 499 601 1636 620 506
600 1646 614 1638 602 507
618 1640 599 1635 599 1634
631
name BB4
9032 4444 600 531 602 503
625 507 599 533 599 504
631 501 602 529 597 511
623 1639 597 1634 603 1632
626 1633 603 508 624 1645
592 1638 595 1637 627 502
599 1635 629 1641 594 502
632 1629 603 507 626 502
599 535 602 1641 596 526
598 508 625 1640 599 503
623 1634 606 1645 595 1626
631
end raw_codes
end remote
/*
* Test this with your APA 1616 [NEC] remote or your IR transmitter
* to make sure the signals are correct
* Requires in your Arduino/libraries/ folder:
* https://github.com/z3t0/Arduino-IRremote
* https://github.com/alistairallan/RgbIrLed
*/
#include <IRremote.h>
#include <RgbIrLed.h>
int RECV_PIN = 2;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
}
void loop() {
if (irrecv.decode(&results)) {
Serial.print("Received: ");
// Serial.println(results.value, HEX);
outputText(results);
irrecv.resume(); // Receive the next value
}
delay(100);
}
void outputText(decode_results &results) {
switch (results.value) {
case 0xF700FF:
Serial.println("Brighter");
break;
case 0xF7807F:
Serial.println("Darker");
break;
case 0xF740BF:
Serial.println("Off");
break;
case 0xF7C03F:
Serial.println("On");
break;
case 0xF720DF:
Serial.println("Red");
break;
case 0xF7A05F:
Serial.println("Green");
break;
case 0xF7609F:
Serial.println("Blue");
break;
case 0xF7E01F:
Serial.println("White");
break;
case 0xF7D02F:
Serial.println("Flash");
break;
case 0xF7F00F:
Serial.println("Strobe");
break;
case 0xF7C837:
Serial.println("Fade");
break;
case 0xF7E817:
Serial.println("Smooth");
break;
case 0xF710EF:
Serial.println("BR1");
break;
case 0xF730CF:
Serial.println("BR2");
break;
case 0xF708F7:
Serial.println("BR3");
break;
case 0xF728D7:
Serial.println("BR4");
break;
case 0xF7906F:
Serial.println("BG1");
break;
case 0xF7B04F:
Serial.println("BG2");
break;
case 0xF78877:
Serial.println("BG3");
break;
case 0xF7A857:
Serial.println("BG4");
break;
case 0xF750AF:
Serial.println("BB1");
break;
case 0xF7708F:
Serial.println("BB2");
break;
case 0xF748B7:
Serial.println("BB3");
break;
case 0xF76897:
Serial.println("BB4");
break;
case 0xFFFFFFFF:
Serial.println("Holding");
break;
default:
Serial.print("Unknown!");
Serial.println(results.value, HEX);
}
}
irsend SEND_ONCE NEC BRIGHTER && sleep 0.5 &&
irsend SEND_ONCE NEC DARKER && sleep 0.5 &&
irsend SEND_ONCE NEC OFF && sleep 0.5 &&
irsend SEND_ONCE NEC ON && sleep 0.5 &&
irsend SEND_ONCE NEC RED && sleep 0.5 &&
irsend SEND_ONCE NEC GREEN && sleep 0.5 &&
irsend SEND_ONCE NEC BLUE && sleep 0.5 &&
irsend SEND_ONCE NEC WHITE && sleep 0.5 &&
irsend SEND_ONCE NEC FLASH && sleep 0.5 &&
irsend SEND_ONCE NEC STROBE && sleep 0.5 &&
irsend SEND_ONCE NEC FADE && sleep 0.5 &&
irsend SEND_ONCE NEC SMOOTH && sleep 0.5 &&
irsend SEND_ONCE NEC BR1 && sleep 0.5 &&
irsend SEND_ONCE NEC BR2 && sleep 0.5 &&
irsend SEND_ONCE NEC BR3 && sleep 0.5 &&
irsend SEND_ONCE NEC BR4 && sleep 0.5 &&
irsend SEND_ONCE NEC BG1 && sleep 0.5 &&
irsend SEND_ONCE NEC BG2 && sleep 0.5 &&
irsend SEND_ONCE NEC BG3 && sleep 0.5 &&
irsend SEND_ONCE NEC BG4 && sleep 0.5 &&
irsend SEND_ONCE NEC BB1 && sleep 0.5 &&
irsend SEND_ONCE NEC BB2 && sleep 0.5 &&
irsend SEND_ONCE NEC BB3 && sleep 0.5 &&
irsend SEND_ONCE NEC BB4 && sleep 0.5 &&
@gregcharles
Copy link

The file apa_1616_ir_codes.txt has one duplicate:
F750AF B2
F750AF B3

My remote sent F7708F for B3. There were two other places where my remote deviated from the ones here, but my remote could be wrong about those.

@tiegz
Copy link
Author

tiegz commented Dec 1, 2020

@gregcharles Thanks, just removed that duplicate! I don't have access to this remote anymore to test it out, but if I do someday I'll come back and retry.

@gregcharles
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment