Skip to content

Commit 9f74650

Browse files
committed
removed board_name field from the constructor
1 parent 35e1c5d commit 9f74650

File tree

10 files changed

+1731
-1734
lines changed

10 files changed

+1731
-1734
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ I made the library with a style which would be quite easy to add other cameras (
4949
## Installation
5050

5151
- Arduino IDE:
52-
- Go to Tools > Manage libraries
52+
- Go to Tools > Manage libraries
5353
- Search for `GoProControl`
5454
- PlatformIO:
5555
- From command line: run ```pio lib install "GoProControl"```
@@ -61,7 +61,7 @@ I made the library with a style which would be quite easy to add other cameras (
6161

6262
## Examples
6363

64-
**Important:** Rename the `Constants.h.example` to `Constants.h` and change the SSID, Password and camera model. If you have a GoPro HERO4 or newer you should add also the [mac address](https://havecamerawilltravel.com/gopro/gopro-mac-address/) and the hostname of the board you want to connect to your camera
64+
**Important:** Rename the `Constants.h.example` to `Constants.h` and change the SSID, Password and camera model. If you have a GoPro HERO4 or newer you should add also the [mac address](https://havecamerawilltravel.com/gopro/gopro-mac-address/) (in a future release this would be done automatically).
6565

6666
## Supported Options
6767

@@ -155,7 +155,7 @@ I made the library with a style which would be quite easy to add other cameras (
155155

156156
**NOTE:** Not all the options are available for all the cameras (for example on a HERO3 you can't set 1080p at 240 frame per second 😲). You can see the possibilities on the manual of your camera of here for [HERO3](https://github.com/KonradIT/goprowifihack/blob/master/HERO3/Framerates-Resolutions.md) and here for [HERO4 and newer](https://github.com/KonradIT/goprowifihack/blob/master/HERO4/Framerates-Resolutions.md)
157157

158-
## To Do list and known issues
158+
## To Do list and known issues
159159

160160
- Missing get status which gives info like mode (photo, video), fow and so on: [see here](https://github.com/KonradIT/goprowifihack/blob/master/HERO5/HERO5-Commands.md#gopro-hero5-commands-status-and-notes)
161161
- Wait for the ESP32 core to make a stable BLE core, right now it has many issues, especially, if used together with wifi: [see here](https://github.com/espressif/arduino-esp32/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+ble)
@@ -170,4 +170,4 @@ I made the library with a style which would be quite easy to add other cameras (
170170

171171
All the commands came from: https://github.com/KonradIT/goprowifihack
172172

173-
The idea of making a GoPro library for arduino comes from another library https://github.com/agdl/GoPRO which works only on arduino WiFi boards and only with GoPro HERO3.
173+
The idea of making a GoPro library for arduino comes from another library https://github.com/agdl/GoPRO which works only on arduino WiFi boards and only with GoPro HERO3.

examples/ESP32_FreeRTOS/Constants.h.example

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
// replace the following:
55
#define GOPRO_SSID "__YOUR__CAMERA__NAME__"
66
#define GOPRO_PASS "__YOUR__CAMERA__PASS__"
7-
#define CAMERA HEROX // your HERO model
7+
#define CAMERA HEROX // your HERO model
88
uint8_t gopro_mac_address[6]= {1,2,3,4,5,6}; // the MAC address of your GoPro
9-
#define BOARD_NAME "__YOUR__BOARD__NAME__"
109

1110
#endif

examples/ESP32_FreeRTOS/ESP32_FreeRTOS.ino

Lines changed: 115 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -7,129 +7,129 @@
77

88
// Choose your camera
99
//GoProControl gp(GOPRO_SSID, GOPRO_PASS, CAMERA); // use this if you have a HERO3 or older
10-
//GoProControl gp(GOPRO_SSID, GOPRO_PASS, CAMERA, gopro_mac_address, BOARD_NAME);
10+
//GoProControl gp(GOPRO_SSID, GOPRO_PASS, CAMERA, gopro_mac_address);
1111

1212
void setup()
1313
{
14-
gp.enableDebug(&Serial);
15-
xTaskCreate(keep_alive, "keep_alive", 10000, NULL, 1, NULL);
14+
gp.enableDebug(&Serial);
15+
xTaskCreate(keep_alive, "keep_alive", 10000, NULL, 1, NULL);
1616
}
1717

1818
void loop()
1919
{
20-
char in = 0;
21-
if (Serial.available() > 0)
22-
{
23-
in = Serial.read();
24-
}
25-
26-
switch (in)
27-
{
28-
default:
29-
break;
30-
31-
// Connect
32-
case 'C':
33-
gp.begin();
34-
break;
35-
36-
// Turn on and off
37-
case 'T':
38-
gp.turnOn();
39-
break;
40-
41-
case 't':
42-
gp.turnOff();
43-
break;
44-
45-
// Take a picture of start a video
46-
case 'A':
47-
gp.shoot();
48-
break;
49-
50-
// Stop the video
51-
case 'S':
52-
gp.stopShoot();
53-
break;
54-
55-
// Set modes
56-
case 'V':
57-
gp.setMode(VIDEO_MODE);
58-
break;
59-
60-
case 'P':
61-
gp.setMode(PHOTO_MODE);
62-
break;
63-
64-
case 'M':
65-
gp.setMode(MULTISHOT_MODE);
66-
break;
67-
68-
// Change the orientation
69-
case 'u':
70-
gp.setOrientation(ORIENTATION_UP);
71-
break;
72-
73-
case 'd':
74-
gp.setOrientation(ORIENTATION_DOWN);
75-
break;
76-
77-
// Change other parameters
78-
case 'W':
79-
gp.setVideoFov(MEDIUM_FOV);
80-
break;
81-
82-
case 'E':
83-
gp.setFrameRate(FR_120);
84-
break;
85-
86-
case 'f':
87-
gp.setPhotoResolution(PR_11MP_WIDE);
88-
break;
89-
90-
case 'F':
91-
gp.setVideoResolution(VR_1080p);
92-
break;
93-
94-
case 'L':
95-
gp.setTimeLapseInterval(60);
96-
break;
97-
98-
// Localize the camera
99-
case 'O':
100-
gp.localizationOn();
101-
break;
102-
103-
case 'I':
104-
gp.localizationOff();
105-
break;
106-
107-
// Delete some files, be carefull!
108-
case 'l':
109-
gp.deleteLast();
110-
break;
111-
112-
case 'D':
113-
gp.deleteAll();
114-
break;
115-
116-
// Print useful data
117-
case 'p':
118-
gp.printStatus();
119-
break;
120-
121-
// Close the connection
122-
case 'X':
123-
gp.end();
124-
break;
125-
}
20+
char in = 0;
21+
if (Serial.available() > 0)
22+
{
23+
in = Serial.read();
24+
}
25+
26+
switch (in)
27+
{
28+
default:
29+
break;
30+
31+
// Connect
32+
case 'C':
33+
gp.begin();
34+
break;
35+
36+
// Turn on and off
37+
case 'T':
38+
gp.turnOn();
39+
break;
40+
41+
case 't':
42+
gp.turnOff();
43+
break;
44+
45+
// Take a picture of start a video
46+
case 'A':
47+
gp.shoot();
48+
break;
49+
50+
// Stop the video
51+
case 'S':
52+
gp.stopShoot();
53+
break;
54+
55+
// Set modes
56+
case 'V':
57+
gp.setMode(VIDEO_MODE);
58+
break;
59+
60+
case 'P':
61+
gp.setMode(PHOTO_MODE);
62+
break;
63+
64+
case 'M':
65+
gp.setMode(MULTISHOT_MODE);
66+
break;
67+
68+
// Change the orientation
69+
case 'u':
70+
gp.setOrientation(ORIENTATION_UP);
71+
break;
72+
73+
case 'd':
74+
gp.setOrientation(ORIENTATION_DOWN);
75+
break;
76+
77+
// Change other parameters
78+
case 'W':
79+
gp.setVideoFov(MEDIUM_FOV);
80+
break;
81+
82+
case 'E':
83+
gp.setFrameRate(FR_120);
84+
break;
85+
86+
case 'f':
87+
gp.setPhotoResolution(PR_11MP_WIDE);
88+
break;
89+
90+
case 'F':
91+
gp.setVideoResolution(VR_1080p);
92+
break;
93+
94+
case 'L':
95+
gp.setTimeLapseInterval(60);
96+
break;
97+
98+
// Localize the camera
99+
case 'O':
100+
gp.localizationOn();
101+
break;
102+
103+
case 'I':
104+
gp.localizationOff();
105+
break;
106+
107+
// Delete some files, be carefull!
108+
case 'l':
109+
gp.deleteLast();
110+
break;
111+
112+
case 'D':
113+
gp.deleteAll();
114+
break;
115+
116+
// Print useful data
117+
case 'p':
118+
gp.printStatus();
119+
break;
120+
121+
// Close the connection
122+
case 'X':
123+
gp.end();
124+
break;
125+
}
126126
}
127127

128128
void keep_alive(void *parameter)
129129
{
130-
while (1)
131-
{
132-
gp.keepAlive();
133-
}
134-
vTaskDelete(NULL);
135-
}
130+
while (1)
131+
{
132+
gp.keepAlive();
133+
}
134+
vTaskDelete(NULL);
135+
}

examples/GoProControl/Constants.h.example

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
// replace the following:
55
#define GOPRO_SSID "__YOUR__CAMERA__NAME__"
66
#define GOPRO_PASS "__YOUR__CAMERA__PASS__"
7-
#define CAMERA HEROX // your HERO model
7+
#define CAMERA HEROX // your HERO model
88
uint8_t gopro_mac_address[6]= {1,2,3,4,5,6}; // the MAC address of your GoPro
9-
#define BOARD_NAME "__YOUR__BOARD__NAME__"
109

1110
#endif

0 commit comments

Comments
 (0)