User Tools

Site Tools


example_captureeveryday

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

example_captureeveryday [2016/09/06 08:53] (current)
act created
Line 1: Line 1:
 +====== Example: Capture one photo every day ======
 +This script captures a photo every day at 09:00 am.
 +
 +<​code>​
 +var cameraName = "GoPro Hero 4";
 +
 +while (true)
 +{
 +    WaitUntilTime("​09:​00:​00"​);​
 +
 +    // Make sure that camera is in "​photo"​ mode
 +    if (GetCameraMode(cameraName) != "​photo"​)
 +    {
 +        SetCameraMode("​photo",​ cameraName);​
 +    }
 +
 +    // Capture photo
 +    SetCameraFunction("​startRecording",​ cameraName);​
 +
 +    // Print information together with the date
 +    LogText("​Recorded photo.",​ true);
 +}
 +</​code>​
  
example_captureeveryday.txt · Last modified: 2016/09/06 08:53 by act