-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGoProControl.h
50 lines (42 loc) · 952 Bytes
/
GoProControl.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
GoProControl.h - Arduino -> GoPro interface via http and udp.
Feel free to copy/modify or do whatever you like with his pice of code.
*/
#ifndef GoProControl_h
#define GoProControl_h
#define WiFi101
#include "Arduino.h"
#ifdef WiFi101
#include <WiFi101.h>
#include <WiFiUdp.h>
#endif
#ifdef WiFi8266
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <WiFiUdp.h>
#endif
class GoProControl
{
public:
GoProControl(char* ssid, char* password, char* GoProIP, int GoProPort, bool debug = false);
bool connect();
bool status();
bool videoModeOn();
bool videoModeOff();
bool trigger();
bool stop();
bool sleep();
bool Settings();
void wake();
private:
bool httpGET(String url);
const char* _ssid;
const char* _password;
const char* _GoProIP;
int _GoProPort;
bool _debug;
#ifdef WiFi101
WiFiClient client;
#endif
};
#endif