Skip to content

Instantly share code, notes, and snippets.

@yoggy
Created September 7, 2013 10:35
Show Gist options
  • Select an option

  • Save yoggy/6474528 to your computer and use it in GitHub Desktop.

Select an option

Save yoggy/6474528 to your computer and use it in GitHub Desktop.
IR remote shutter for Sony NEX.
//
// ir_remote_shutter_for_nex.ino - IR remote shutter for Sony NEX.
//
// this sketch is using IRremote library
// https://github.com/shirriff/Arduino-IRremote
//
#include <IRremote.h>
IRsend irsend; // please connect the IR-LED to D3.
void setup() {
Serial.begin(115200);
}
void loop() {
if (Serial.available()) {
sonyShutterRelease();
// clear rx buffer
while(Serial.available()) {
Serial.read();
}
}
}
void sonyShutterRelease() {
// Send Command 3 times as per Sony Specs
for (int i = 0; i < 3; ++i) {
irsend.sendSony(0xB4B8F, 20);
delay(5);
}
delay(1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment