Skip to content

Instantly share code, notes, and snippets.

@navillus5
navillus5 / BlinkTwoAlternate
Created September 20, 2013 03:23
Another slight variation on the Arduino Blink Example
/*
BlinkTwo
Turns two LEDs on and off in unison.
The delay times are controlled by two variables that are defined at the
beginning of the program.
This example code is in the public domain.
*/
// Use the LEDs that are connected to I/O pins 12 and 13
@navillus5
navillus5 / BlinkTwo
Last active December 23, 2015 12:08
Slight modification of the Arduino Blink sketch
/*
BlinkTwo
Turns two LEDs on and off in unison.
The delay times are controlled by two variables
that are defined at the beginning of the program.
This example code is in the public domain.
*/
// Use the LEDs that are connected to I/O pins 12 and 13
#include <TimerOne.h>
#include <Wire.h>
//comment this out to see the demodulated waveform
//it is useful for debugging purpose.
#define MODULATED 1
const int IR_PIN = 3;
const unsigned long DURATION = 180000l;
const int HEADER_DURATION = 2000;