/* ATtiny85 Sony NEX/Alpha Remote Control David Johnson-Davies - www.technoblogy.com - 12th April 2015 ATtiny85 @ 1 MHz (internal oscillator; BOD disabled) CC BY 4.0 Licensed under a Creative Commons Attribution 4.0 International license: http://creativecommons.org/licenses/by/4.0/ */ #include // Pin assignments const int IRout = 1; // OC0B const int Shutter = 4; const int TwoSecs = 2; const int Video = 0; const int LED = 3; // Remote control const int Address = 0x1E3A; const int ShutterCode = 0x2D; const int TwoSecsCode = 0x37; const int VideoCode = 0x48; // IR transmitter ********************************************** const int top = 24; // 1000000/25 = 40kHz const int match = 18; // pulses with approx 25% mark/space ratio // Set up Timer/Counter0 to output PCM on OC0B void SetupPCM () { TCCR0A = 3<