Dear all,
I'm working on photoduino (Google Code Archive - Long-term storage for Google Code Project Hosting.) open source camera controller for my DSLR camera.
Unfortunatly I'm not a programmer guy but only a photographer.
Looking to firmware code (Google Code Archive - Long-term storage for Google Code Project Hosting.) I'm interested in changing those parts (I think):
runmode_barrier.pde:
if (barrierMode_shootingMode == SHOOTINGMODE_PREBULB) {
camera_autofocusBegin(barrierMode_autofocusTime);
camera_shutterBegin(barrierMode_shutterLagTime);
laser_turnOn();
sensor_waitFor(PINS_SENSOR_BARRIER, SENSOR_MODE_LOWER, barrierMode_sensorLimit, 0);
laser_turnOff();
if(!cancelFlag) {
if (barrierMode_useFlash1) flash_shoot(barrierMode_preFlash1Time, PINS_FLASH1);
if (barrierMode_useFlash2) flash_shoot(barrierMode_preFlash2Time, PINS_FLASH2);
}
devices_manager.pde:
boolean sensor_waitFor(byte pin, byte mode, unsigned int limitValue, unsigned int limitTime){
unsigned long time = millis();
unsigned int sensorValue = sensor_read(pin);
boolean result = false;
for(; !result && !cancelFlag && (millis()<time+limitTime || limitTime==0); sensorValue = sensor_read(pin)) {
if (mode==SENSOR_MODE_HIGHER && sensorValue>=limitValue) result = true;
if (mode==SENSOR_MODE_LOWER && sensorValue<=limitValue) result = true;
}
if(cancelFlag) result = true;
return result;
}
In this mode the camera shutter stay open until sensor_WaitFor becomes FALSE (i think). But this mean that shutter can stay open for minutes or hour until something broke the barrier.
I would like to limit this to 30sec. after that time if nothing broke the barrier,close the shutter and than restart the cycle without activating the flash (flash_shoot). How do I modify the code to achieve this?
Could you please help me?
Kind regards,
Gianpaolo.