Skip to content

Instantly share code, notes, and snippets.

@mattdsteele
Last active August 29, 2015 14:11
Show Gist options
  • Save mattdsteele/c6c0504bdab640035f02 to your computer and use it in GitHub Desktop.
Save mattdsteele/c6c0504bdab640035f02 to your computer and use it in GitHub Desktop.
Bike Lights
#include <IRremote.h>
IRsend irsend;
unsigned int on[67] = { 8874,4565,511,597,533,554,533,575,511,575,554,554,554,554,511,597,533,554,554,1685,511,1685,533,1685,575,1706,533,554,554,1706,511,1685,533,1706,554,1685,554,1685,511,575,554,533,575,533,533,575,511,554,554,533,533,575,554,554,554,1685,533,1685,554,1685,575,1685,533,1685,533,1685,554};
unsigned int off[67] = { 8853,4565,533,575,511,554,575,554,469,639,511,575,575,511,490,618,511,575,533,1706,533,1706,511,1706,575,1685,533,533,597,1642,511,1706,554,1663,575,554,511,1685,575,533,554,575,490,575,575,511,554,554,533,575,490,1749,554,533,554,1706,533,1685,533,1727,533,1685,575,1663,490,1706,554};
unsigned int dimmer[67] = { 8895,4543,554,533,533,575,533,554,533,575,511,575,554,533,575,554,511,597,511,1685,533,1706,554,1685,533,1706,511,575,533,1663,554,1685,575,1685,511,1685,533,575,554,554,554,554,511,575,554,533,554,533,533,597,511,554,554,1685,554,1706,511,1685,575,1706,511,1706,511,1706,554,1685,554};
unsigned int brighter[67] = { 8938,4501,575,554,490,618,511,554,575,554,490,597,554,554,554,533,511,597,554,1685,511,1706,575,1663,554,1685,511,597,554,1685,490,1727,575,1685,533,533,575,533,511,618,511,554,554,533,511,597,554,554,554,554,490,1727,575,1685,533,1685,511,1727,554,1685,554,1685,490,1727,575,1663,554};
unsigned int white[67] = { 8938,4522,554,533,511,618,533,554,554,533,511,618,533,554,554,554,490,618,533,1685,511,1727,575,1706,533,1685,511,618,533,1685,511,1706,575,1706,533,1685,511,1727,554,1685,554,533,575,554,469,639,533,533,575,533,511,618,533,554,554,533,511,1727,554,1685,554,1685,511,1706,575,1685,554};
unsigned int flash[67] = { 8938,4501,575,533,511,618,533,554,554,533,511,597,533,554,554,554,490,597,554,1685,511,1706,575,1706,533,1685,511,597,554,1685,511,1706,575,1685,533,1685,511,1706,575,554,469,1727,575,554,490,618,533,533,575,533,511,618,533,554,554,1685,554,554,554,1685,554,1706,469,1749,554,1685,533};
unsigned int strobe[67] = { 8917,4522,554,554,490,597,554,554,554,533,490,639,511,554,575,554,490,597,554,1685,511,1727,575,1706,533,1685,511,618,533,1685,511,1727,554,1685,533,1706,469,1727,575,1685,554,1685,511,597,554,554,554,554,490,597,554,533,575,554,469,639,533,533,575,1685,554,1706,490,1727,554,1685,554};
unsigned int fade[67] = { 8874,4565,511,597,554,554,554,554,469,618,533,533,575,554,490,618,511,554,554,1685,554,1663,511,1727,575,1685,554,533,575,1685,554,1685,511,1727,554,1685,554,1685,490,618,533,533,575,1706,533,554,554,554,490,597,554,554,554,554,490,1727,575,1706,533,533,575,1706,533,1685,511,1727,575};
unsigned int smooth[67] = { 8895,4543,533,575,554,554,554,554,511,575,554,533,575,554,490,618,511,554,575,1706,511,1685,533,1685,575,1685,554,533,575,1685,533,1685,533,1706,554,1685,554,1685,511,1685,575,533,533,1706,554,533,533,597,511,554,554,554,511,575,533,533,575,1685,511,554,575,1685,533,1685,511,1706,554};
unsigned int b0[67] = { 8874,4543,511,618,511,554,575,554,490,618,533,554,554,533,511,597,554,533,575,1685,554,1685,511,1706,575,1685,554,554,554,1706,533,1663,511,1706,575,533,511,1727,554,1706,533,554,554,554,490,618,533,533,575,554,490,1727,554,533,511,618,511,1685,511,1706,575,1685,554,1685,511,1706,575};
unsigned int b1[67] = { 8895,4522,511,618,511,554,575,533,533,597,511,554,554,554,511,575,533,554,554,1663,554,1663,533,1685,575,1685,533,554,554,1685,554,1685,511,1685,575,533,533,1706,554,533,533,1706,554,554,511,575,554,533,575,554,511,1685,575,533,533,1706,554,533,533,1706,554,1685,554,1706,511,1685,575};
unsigned int b2[67] = { 8895,4543,533,575,554,533,575,554,511,575,554,554,554,533,511,597,511,554,554,1685,554,1706,511,1706,575,1685,511,554,575,1685,533,1685,533,1685,575,554,511,1706,575,1685,511,1685,533,575,533,554,533,554,533,575,554,1685,511,597,533,554,554,533,533,1706,554,1685,533,1706,511,1706,575};
unsigned int b3[67] = { 8895,4543,511,618,511,554,554,533,533,575,554,554,554,533,533,597,533,554,554,1685,511,1685,533,1706,554,1685,554,554,554,1685,554,1685,511,1706,575,533,533,1706,554,533,533,575,554,1685,533,575,533,533,575,533,533,1706,575,533,533,1706,554,1685,554,533,575,1685,533,1685,533,1727,554};
unsigned int b4[67] = { 8895,4543,533,575,533,554,554,554,511,575,554,533,575,554,511,597,511,554,575,1685,533,1663,533,1706,554,1685,554,533,575,1685,511,1685,533,1685,554,533,533,1685,575,1685,511,554,575,1685,533,554,554,533,533,575,554,1685,511,575,554,554,554,1685,511,554,554,1685,511,1685,533,1685,554};
unsigned int g0[67] = { 8874,4586,469,618,554,533,575,554,490,618,533,554,554,554,490,597,554,554,554,1685,554,1685,511,1706,575,1685,554,554,554,1685,554,1706,469,1727,575,1706,533,533,575,1706,533,554,554,533,511,597,533,554,554,554,490,597,554,1685,511,618,533,1685,511,1727,575,1685,554,1706,469,1727,575};
unsigned int g1[67] = { 8853,4586,490,618,554,554,554,554,469,639,511,533,575,533,490,639,490,597,554,1685,554,1706,469,1727,575,1706,533,554,554,1685,533,1685,490,1727,554,1685,533,575,533,554,490,1727,533,554,490,618,511,575,533,575,469,618,511,1706,490,1749,533,554,490,1749,533,1706,511,1727,469,1727,575};
unsigned int g2[67] = { 8874,4565,490,618,554,554,554,554,447,639,554,533,575,533,490,639,511,554,554,1685,554,1685,469,1727,575,1706,533,554,554,1706,533,1663,490,1749,554,1663,554,554,554,1706,533,1685,511,597,554,554,554,533,511,618,533,554,554,1685,554,554,554,533,511,1749,554,1685,554,1706,490,1727,575};
unsigned int g3[67] = { 8874,4565,511,575,554,554,554,554,490,618,511,554,575,533,533,575,533,554,554,1685,554,1685,511,1685,575,1685,533,554,554,1685,533,1706,511,1685,575,1685,511,554,554,533,533,597,511,1685,533,575,554,554,554,554,511,575,554,1685,533,1706,554,1685,533,554,554,1685,533,1685,511,1685,575};
unsigned int g4[67] = { 8895,4543,554,575,554,554,554,533,511,618,511,554,575,533,533,575,533,554,533,1685,554,1685,533,1706,575,1685,533,554,554,1685,554,1706,511,1685,575,1706,511,554,575,1685,533,575,533,1685,554,554,533,575,490,597,554,554,554,1706,511,554,554,1685,533,554,533,1706,554,1685,533,1685,575};
unsigned int r0[67] = { 8874,4565,511,597,511,575,533,597,511,554,511,575,533,575,533,597,533,554,533,1727,469,1770,469,1727,533,1749,469,575,511,1727,533,1685,511,1706,554,554,511,554,511,1706,575,575,490,554,533,575,511,597,533,554,554,1685,511,1706,575,533,511,1706,511,1706,533,1706,469,1791,469,1727,554};
unsigned int r1[67] = { 8874,4565,511,597,511,597,533,554,511,597,511,575,533,597,533,597,490,575,533,1727,533,1685,511,1727,575,1663,511,575,511,1749,490,1706,490,1749,533,533,533,597,490,575,533,1706,511,575,554,554,533,597,511,554,533,1706,511,1706,511,1706,469,639,533,1685,533,1727,554,1663,511,1727,554};
unsigned int r2[67] = { 8895,4565,511,597,533,575,533,533,533,597,490,575,554,554,533,575,511,575,533,1727,533,1663,533,1706,554,1663,533,554,554,1706,490,1706,533,1706,533,554,511,597,533,1706,490,1727,554,554,554,575,511,575,533,554,533,1749,511,1685,511,575,575,533,490,1727,533,1727,533,1685,490,1727,618};
unsigned int r3[67] = { 8874,4565,533,597,511,554,554,554,511,575,533,554,554,554,511,597,511,575,554,1685,533,1706,511,1685,554,1706,511,554,554,1685,533,1685,533,1685,554,554,511,597,533,533,575,554,533,1685,575,533,533,575,533,575,511,1706,554,1685,511,1727,554,1685,533,554,554,1685,554,1706,511,1685,575};
unsigned int r4[67] = { 8874,4586,490,597,511,575,554,554,469,618,533,554,533,575,490,618,511,554,533,1706,554,1685,533,1685,490,1770,511,554,554,1685,575,1642,490,1770,533,554,490,597,533,1685,511,618,511,1685,533,597,511,597,511,575,511,1727,554,1663,511,575,533,1727,511,554,554,1706,554,1663,490,1706,575};
const int FREQUENCY = 38;
const int DELAY_LOW = 1000;
const int DELAY_HIGH = 20000;
const int DELAY_STARTUP = 1000;
const int DELAY_FADE = 4950;
void setup()
{
Serial.begin(9600);
}
void ir(unsigned int code[]) {
irsend.sendRaw(code, 67, FREQUENCY);
}
void halt() {
delay(random(DELAY_LOW, DELAY_HIGH));
}
void loop() {
ir(on); delay(DELAY_STARTUP);
ir(r0); halt();
ir(r2); halt();
ir(r4); halt();
ir(g0); halt();
ir(r4); halt();
ir(r2); halt();
ir(r0); halt();
ir(fade); delay(DELAY_FADE);
ir(g0); halt();
ir(flash); halt();
ir(white); halt();
}
# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.9.0(usb_irtoy) on Tue Dec 9 20:16:45 2014
#
# contributed by
#
# brand: remote-raw.conf
# model no. of remote control:
# devices being controlled by this remote:
#
begin remote
name remote-raw.conf
flags RAW_CODES|CONST_LENGTH
eps 30
aeps 100
gap 108352
begin raw_codes
name on
8874 4565 511 597 533 554
533 575 511 575 554 554
554 554 511 597 533 554
554 1685 511 1685 533 1685
575 1706 533 554 554 1706
511 1685 533 1706 554 1685
554 1685 511 575 554 533
575 533 533 575 511 554
554 533 533 575 554 554
554 1685 533 1685 554 1685
575 1685 533 1685 533 1685
554
name off
8853 4565 533 575 511 554
575 554 469 639 511 575
575 511 490 618 511 575
533 1706 533 1706 511 1706
575 1685 533 533 597 1642
511 1706 554 1663 575 554
511 1685 575 533 554 575
490 575 575 511 554 554
533 575 490 1749 554 533
554 1706 533 1685 533 1727
533 1685 575 1663 490 1706
554
name dimmer
8895 4543 554 533 533 575
533 554 533 575 511 575
554 533 575 554 511 597
511 1685 533 1706 554 1685
533 1706 511 575 533 1663
554 1685 575 1685 511 1685
533 575 554 554 554 554
511 575 554 533 554 533
533 597 511 554 554 1685
554 1706 511 1685 575 1706
511 1706 511 1706 554 1685
554
name brighter
8938 4501 575 554 490 618
511 554 575 554 490 597
554 554 554 533 511 597
554 1685 511 1706 575 1663
554 1685 511 597 554 1685
490 1727 575 1685 533 533
575 533 511 618 511 554
554 533 511 597 554 554
554 554 490 1727 575 1685
533 1685 511 1727 554 1685
554 1685 490 1727 575 1663
554
name white
8938 4522 554 533 511 618
533 554 554 533 511 618
533 554 554 554 490 618
533 1685 511 1727 575 1706
533 1685 511 618 533 1685
511 1706 575 1706 533 1685
511 1727 554 1685 554 533
575 554 469 639 533 533
575 533 511 618 533 554
554 533 511 1727 554 1685
554 1685 511 1706 575 1685
554
name flash
8938 4501 575 533 511 618
533 554 554 533 511 597
533 554 554 554 490 597
554 1685 511 1706 575 1706
533 1685 511 597 554 1685
511 1706 575 1685 533 1685
511 1706 575 554 469 1727
575 554 490 618 533 533
575 533 511 618 533 554
554 1685 554 554 554 1685
554 1706 469 1749 554 1685
533
name strobe
8917 4522 554 554 490 597
554 554 554 533 490 639
511 554 575 554 490 597
554 1685 511 1727 575 1706
533 1685 511 618 533 1685
511 1727 554 1685 533 1706
469 1727 575 1685 554 1685
511 597 554 554 554 554
490 597 554 533 575 554
469 639 533 533 575 1685
554 1706 490 1727 554 1685
554
name fade
8874 4565 511 597 554 554
554 554 469 618 533 533
575 554 490 618 511 554
554 1685 554 1663 511 1727
575 1685 554 533 575 1685
554 1685 511 1727 554 1685
554 1685 490 618 533 533
575 1706 533 554 554 554
490 597 554 554 554 554
490 1727 575 1706 533 533
575 1706 533 1685 511 1727
575
name smooth
8895 4543 533 575 554 554
554 554 511 575 554 533
575 554 490 618 511 554
575 1706 511 1685 533 1685
575 1685 554 533 575 1685
533 1685 533 1706 554 1685
554 1685 511 1685 575 533
533 1706 554 533 533 597
511 554 554 554 511 575
533 533 575 1685 511 554
575 1685 533 1685 511 1706
554
name b0
8874 4543 511 618 511 554
575 554 490 618 533 554
554 533 511 597 554 533
575 1685 554 1685 511 1706
575 1685 554 554 554 1706
533 1663 511 1706 575 533
511 1727 554 1706 533 554
554 554 490 618 533 533
575 554 490 1727 554 533
511 618 511 1685 511 1706
575 1685 554 1685 511 1706
575
name b1
8895 4522 511 618 511 554
575 533 533 597 511 554
554 554 511 575 533 554
554 1663 554 1663 533 1685
575 1685 533 554 554 1685
554 1685 511 1685 575 533
533 1706 554 533 533 1706
554 554 511 575 554 533
575 554 511 1685 575 533
533 1706 554 533 533 1706
554 1685 554 1706 511 1685
575
name b2
8895 4543 533 575 554 533
575 554 511 575 554 554
554 533 511 597 511 554
554 1685 554 1706 511 1706
575 1685 511 554 575 1685
533 1685 533 1685 575 554
511 1706 575 1685 511 1685
533 575 533 554 533 554
533 575 554 1685 511 597
533 554 554 533 533 1706
554 1685 533 1706 511 1706
575
name b3
8895 4543 511 618 511 554
554 533 533 575 554 554
554 533 533 597 533 554
554 1685 511 1685 533 1706
554 1685 554 554 554 1685
554 1685 511 1706 575 533
533 1706 554 533 533 575
554 1685 533 575 533 533
575 533 533 1706 575 533
533 1706 554 1685 554 533
575 1685 533 1685 533 1727
554
name b4
8895 4543 533 575 533 554
554 554 511 575 554 533
575 554 511 597 511 554
575 1685 533 1663 533 1706
554 1685 554 533 575 1685
511 1685 533 1685 554 533
533 1685 575 1685 511 554
575 1685 533 554 554 533
533 575 554 1685 511 575
554 554 554 1685 511 554
554 1685 511 1685 533 1685
554
name g0
8874 4586 469 618 554 533
575 554 490 618 533 554
554 554 490 597 554 554
554 1685 554 1685 511 1706
575 1685 554 554 554 1685
554 1706 469 1727 575 1706
533 533 575 1706 533 554
554 533 511 597 533 554
554 554 490 597 554 1685
511 618 533 1685 511 1727
575 1685 554 1706 469 1727
575
name g1
8853 4607 447 639 511 575
533 575 469 639 533 554
554 533 490 639 533 554
554 1685 533 1706 469 1727
533 1706 511 575 511 1706
511 1706 490 1749 533 1727
490 597 511 575 469 1749
511 575 469 618 511 597
533 575 469 639 490 1706
490 1749 533 575 490 1749
511 1727 490 1727 469 1749
511
name g1
8853 4586 490 618 554 554
554 554 469 639 511 533
575 533 490 639 490 597
554 1685 554 1706 469 1727
575 1706 533 554 554 1685
533 1685 490 1727 554 1685
533 575 533 554 490 1727
533 554 490 618 511 575
533 575 469 618 511 1706
490 1749 533 554 490 1749
533 1706 511 1727 469 1727
575
name g2
8874 4565 490 618 554 554
554 554 447 639 554 533
575 533 490 639 511 554
554 1685 554 1685 469 1727
575 1706 533 554 554 1706
533 1663 490 1749 554 1663
554 554 554 1706 533 1685
511 597 554 554 554 533
511 618 533 554 554 1685
554 554 554 533 511 1749
554 1685 554 1706 490 1727
575
name g3
8874 4565 511 575 554 554
554 554 490 618 511 554
575 533 533 575 533 554
554 1685 554 1685 511 1685
575 1685 533 554 554 1685
533 1706 511 1685 575 1685
511 554 554 533 533 597
511 1685 533 575 554 554
554 554 511 575 554 1685
533 1706 554 1685 533 554
554 1685 533 1685 511 1685
575
name g4
8895 4543 554 575 554 554
554 533 511 618 511 554
575 533 533 575 533 554
533 1685 554 1685 533 1706
575 1685 533 554 554 1685
554 1706 511 1685 575 1706
511 554 575 1685 533 575
533 1685 554 554 533 575
490 597 554 554 554 1706
511 554 554 1685 533 554
533 1706 554 1685 533 1685
575
name r0
8874 4565 511 597 511 575
533 597 511 554 511 575
533 575 533 597 533 554
533 1727 469 1770 469 1727
533 1749 469 575 511 1727
533 1685 511 1706 554 554
511 554 511 1706 575 575
490 554 533 575 511 597
533 554 554 1685 511 1706
575 533 511 1706 511 1706
533 1706 469 1791 469 1727
554
name r1
8874 4565 511 597 511 597
533 554 511 597 511 575
533 597 533 597 490 575
533 1727 533 1685 511 1727
575 1663 511 575 511 1749
490 1706 490 1749 533 533
533 597 490 575 533 1706
511 575 554 554 533 597
511 554 533 1706 511 1706
511 1706 469 639 533 1685
533 1727 554 1663 511 1727
554
name r2
8895 4565 511 597 533 575
533 533 533 597 490 575
554 554 533 575 511 575
533 1727 533 1663 533 1706
554 1663 533 554 554 1706
490 1706 533 1706 533 554
511 597 533 1706 490 1727
554 554 554 575 511 575
533 554 533 1749 511 1685
511 575 575 533 490 1727
533 1727 533 1685 490 1727
618
name r3
8874 4565 533 597 511 554
554 554 511 575 533 554
554 554 511 597 511 575
554 1685 533 1706 511 1685
554 1706 511 554 554 1685
533 1685 533 1685 554 554
511 597 533 533 575 554
533 1685 575 533 533 575
533 575 511 1706 554 1685
511 1727 554 1685 533 554
554 1685 554 1706 511 1685
575
name r4
8874 4586 490 597 511 575
554 554 469 618 533 554
533 575 490 618 511 554
533 1706 554 1685 533 1685
490 1770 511 554 554 1685
575 1642 490 1770 533 554
490 597 533 1685 511 618
511 1685 533 597 511 597
511 575 511 1727 554 1663
511 575 533 1727 511 554
554 1706 554 1663 490 1706
575
end raw_codes
end remote
# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.9.0(usb_irtoy) on Mon Dec 8 23:09:39 2014
#
# contributed by
#
# brand: remote.conf
# model no. of remote control:
# devices being controlled by this remote:
#
begin remote
name remote.conf
bits 16
flags SPACE_ENC|CONST_LENGTH
eps 30
aeps 100
header 8899 4526
one 538 1688
zero 538 558
ptrail 554
repeat 8901 2261
pre_data_bits 16
pre_data 0xF7
gap 108279
toggle_bit_mask 0x0
begin codes
on 0xC03F
off 0x40BF
dimmer 0x807F
brighter 0x00FF
flash 0xD02F
strobe 0xF00F
fade 0xC837
smooth 0xE817
w0 0xE01F
b0 0x609F
b1 0x50AF
b2 0x708F
b3 0x48B7
b4 0x6897
g0 0xA05F
g1 0x906F
g2 0xB04F
g3 0x8877
g4 0xA857
r1 0x20DF
r2 0x10EF
r3 0x30CF
r4 0x08F7
r5 0x28D7
end codes
end remote
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment