Created
November 28, 2012 10:43
-
-
Save tagliati/4160433 to your computer and use it in GitHub Desktop.
Simple arduino code to shoot using chdk
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
/* | |
Camera shooter. | |
Simple code to use in a usb remote control using chdk | |
Using TwoPress switch mode | |
*/ | |
void setup() { | |
// pin 13 is just to view the status of trigger cycle | |
pinMode(13, OUTPUT); | |
// trigger pin | |
pinMode(9,OUTPUT); | |
} | |
void loop() { | |
// Shoot half - prepare to shoot ( charge flash, focus/ exposure) | |
digitalWrite(9,HIGH); | |
digitalWrite(13,HIGH); | |
// wait 5 sec in this state. | |
delay(5000); | |
//release the button | |
digitalWrite(9,LOW); | |
digitalWrite(13, LOW); | |
delay(5); | |
// shoot full | |
digitalWrite(9,HIGH); | |
digitalWrite(13,HIGH); | |
delay(200); | |
digitalWrite(9,LOW); | |
digitalWrite(13,LOW); | |
delay(16000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment