UNPKG
goproh4
Version:
latest (0.4.2)
0.4.2
0.4.0
0.3.0
0.2.0
0.1.0
API for controlling GoPro Hero 4 cameras
github.com/citolen/goproh4
citolen/goproh4
goproh4
/
examples
/
poweroffon.js
17 lines
(15 loc)
•
287 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
var
GoPro
=
require
(
'../lib/index.js'
);
var
cam =
new
GoPro
.
Camera
({
// mac: 'xx:xx:xx:xx:xx:xx'
}); cam.
ready
() .
then
(
function
(
) {
// Turn the camera off
return
cam.
powerOff
(); })
// Wait 8s
.
delay
(
8000
) .
then
(
function
(
) {
// Turn the camera on
cam.
powerOn
(); });