- Overview
- Construction
- dSLR Remote Pro and Breeze Viewer Software
- You Are Here!
- Wireless Internet & Auto-Upload to Flickr
- Photo Booth Props
- Prototype Testing: Bad Holiday Sweater Party
- The Wedding
Part IV: Arcade Buttons!
The big Green button is LED backlit, and will be used to initiate either the Photo or Video countdown. Wiring was simple and straight forward. Power to the Teensy is provided by the USB Cable going to the PC. I found other teensy projects that were similar and used online documentation to figure out how to wire up the board properly. Some people used resistors and power from the teensy, but I kept it as simple as possible.
You can used compiled C programming code, or Arduino to configure the Teensy. I used Arduino, and here is my script that was uploaded to the Teensy. The final version had the big green button simulating a left click of the mouse, the black button to toggle live view (F6 button), and the yellow button to toggle back and forth between Photo and Video modes. (CTRL-S)
/*
Photobooth LED Buttons
*/
// Setting variables that correspond to the PIN numbers that
const int boothStart = 8; // Green Start Button - 8
const int liveViewMode = 4; // Live View Mode Toggle - 6
const int videoPhotoMode = 6; // Photo / Video Mode Toggle Button - 4
int startButtonStatus = 0;
int liveViewButtonStatus = 0;
int cameraButtonStatus = 0;
void setup() {
pinMode(boothStart, INPUT);
pinMode(liveViewMode, INPUT);
pinMode(videoPhotoMode, INPUT);
}
void loop(){
// Check Button Status
startButtonStatus = digitalRead(boothStart);
liveViewButtonStatus = digitalRead(liveViewMode);
cameraButtonStatus = digitalRead(videoPhotoMode);
// If boothStart button is pressed
if (startButtonStatus == HIGH) {
Mouse.set_buttons(1, 0, 0); // click left button
// delay(100);
Mouse.set_buttons(0, 0, 0); // release buttons
delay(500);
}
// If liveViewButton button is pressed
if (liveViewButtonStatus == HIGH) {
Keyboard.set_key1(KEY_F6);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
delay(500);
}
// If cameraMode button is pressed
if (cameraButtonStatus == HIGH) {
Keyboard.set_modifier(MODIFIERKEY_CTRL);
Keyboard.set_key1(KEY_S);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
delay(500);
}
}
I tried verifying the code in Arduino 1.0.1 and it claims that 'Mouse' is only supported in Arduino Leonardo, am I missing something?
ReplyDeleteThere is only something about getting shoulder-to-bear behind a window ornament which makes a feeling of fellowship and fun, where individuals feel they can give up a little and appreciate a mutual affair. Metroclick.com
ReplyDeleteIts a great pleasure reading your post.Its full of information about Photobooth, thanks for sharing with us
ReplyDeleteYou have shared some great post about photo booth which contains some best knowledge which could not easily to find so. Keep it up. corporate photo booth Chicago.
ReplyDeleteI came to this blog and it helped me to add few new points to my knowledge. we provide Professional Photo Editing Service in Netherlands at affordable charges. to know more visit our website.
ReplyDelete