Created
September 7, 2013 10:35
-
-
Save yoggy/6474528 to your computer and use it in GitHub Desktop.
IR remote shutter for Sony NEX.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // 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