// Maurice Ribble // 4-9-2008 // http://www.glacialwanderer.com/hobbyrobotics // This code just lets you turn a digital out pin high for a short time. // That's all that is needed to verify the flash circuit is working. // Press the space bar to trigger the flash. #define CAMERA_FLASH_PIN 4 void setup() { pinMode(CAMERA_FLASH_PIN, OUTPUT); digitalWrite(CAMERA_FLASH_PIN, LOW); Serial.begin(9600); // open serial Serial.println("Press the spacebar to trigger the flash"); } void loop() { int cmd; while (Serial.available() > 0) { int cmd = Serial.read(); switch (cmd) { case ' ': { digitalWrite(CAMERA_FLASH_PIN, HIGH); delay(100); digitalWrite(CAMERA_FLASH_PIN, LOW); break; } default: { Serial.println("Press the spacebar to trigger the flash"); } } } }