Difference between revisions of "Time-lapse Photography"
From Microduino Wiki
(→Equipment) |
(→Objective) |
||
Line 4: | Line 4: | ||
| | | | ||
==Objective == | ==Objective == | ||
− | + | mCookie time-lapse photography is achieved by using Microduino-IR Transmitter sensor to delay time and send infrared signal to control a camera. | |
==Principle== | ==Principle== |
Revision as of 01:45, 2 November 2015
Language: | English • 中文 |
---|
ContentsObjectivemCookie time-lapse photography is achieved by using Microduino-IR Transmitter sensor to delay time and send infrared signal to control a camera. PrincipleHere we can set the time delay by detecting how many times you press the key and use the infrared transmission sensor to control SONY camera. Equipment
Hardware Buildup
Software Debugging
#define PHOTO 0xB4B8F //SONY camera ending
#define KEY 2 //Key interface
boolean keyFlag = false; //Key flag
unsigned long timeFlag = 0; //Time flag
int delayTime = 0;
IRsend irsend;
if((millis()> timeFlag+1000)&&delayTime>0) // Judge how many time you press the key. If you can't detect the next press-down within one second of the last press-down, it means you've finished pressing down.
{
delay(delayTime*1000); //Set the delay time according to how many times you press down.
for (int i = 0; i < 3; i++)
{
irsend.sendSony(PHOTO, 20); //Send photographing instruction
delay(10);
}
Serial.println("take photo");
delayTime = 0;
}
if(keyFlag==false && digitalRead(KEY)==LOW) //Judge if the key is pressed down.
{
keyFlag = true;
}
else if(keyFlag==true && digitalRead(KEY)==HIGH) //Judge if the key is released.
{
delayTime++; //The time of pressing the key+1
timeFlag = millis();
keyFlag=false;
}
delay(100); ProgramResultAlign the infrared transmission sensor to the infrared receiving head of the camera, set remote control mode, press the key for several times and then take pictures after a while. Video |