The code is used to trigger the Canon Cameras and the flash lights.
sudo apt-get install arduino
Tools -> Board -> Choose Arduino Mega 2560 or Mega ADK
Serial Port -> /dev/ttyACM0
Serial Monitor -> 115200 baud
Programmer -> USBasp
- if cannot open the serial port,
sudo arduino
- 26 cameraPin: D2 - D27 (pin13 error, skip. change camera11 from pin13 to pin27)
- 26 hotshoePin: D28 - D53
- 16 flashPin: D54 - D69 [Notice] Serial Communication Usage: RX0(D0) TX0(D1)
- D2 - D27: pinMode(OUTPUT), init High
- D28 - D53: pinMode(INPUT_PULLUP)
- D54 - D69: pinMode(OUTPUT), init HIGH
void triggerFlash(int idx)
{
digitalWrite(flashPin[idx], LOW);
delay(1);
digitalWrite(flashPin[idx], HIGH);
}
1-3-7-11
are used for environment lighting0-2-4-5-6-8-9-10
are used for photometric stereo
boolean hotshoeReady(int hotshoeIdx[], int count)
{
for(int i=0; i<count; i++)
{
int pinIdx = hotshoeIdx[i];
if(digitalRead(hotshoePin[pinIdx])) {return false;}
}
return true;
}
- 1 -> fyffe configuration
- 2 -> uniform illumination (24 cameras + 4 lights)
- 3 -> burst mode all cameras
- 4 -> burst mode camera 12
- 5 -> all flashes
- 100 -> debug_mode_test_flash (100,0)
- 101 -> debug_mode_test_hotshoe_time (101)