|
目标 :实现(高速)同步拍摄触发,延时拍摄
硬件原理:相机控制三线,一般A地线 B 对焦(半按快门) C 快门 让B C线接A
线即是快门按下。
用品
ATTINY45 (ARDUINO) 空间紧张建议用85
跳线 3v 纽扣电池
直联注意相机安全,
程序:
通过P4低电平导通快门;
设置参数有间隔时间及拍摄张数
按下P3(接地)时开始
经验值,P4接地时间保持长一点,否则相机还没反应过来。
程序:
int delay_time = 300; //5*100 - 200
int shut_count = 10;
int shutterpin = 4;
int presspin = 3;
boolean start = true;
void setup() {
pinMode(shutterpin, INPUT);
pinMode(presspin, INPUT_PULLUP);
}
void loop() {
int i ,val;
delay(1000); //wait for change the value use serial if serial is value
val = digitalRead(presspin);
if(val == LOW)
{
for (i=0;i<shut_count;i++)
{
shut(); //show work
delay(delay_time);
}
start = false;
}
//need to end show end
}
void shut()
{
pinMode(shutterpin, OUTPUT);
digitalWrite(shutterpin, LOW); // turn the LED on
delay(150); // wait for a little
pinMode(shutterpin, INPUT); // turn the LED off
delay(150); // test the jingyan ,for camra can take
}
下一步,通过串口程序命令设置间隔时间及拍摄张数(未测试完毕);使用MAX芯片实现快门线导通;实验板转应用
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|