Skip to content

Commit

Permalink
removed board_name field from the constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
aster94 committed Mar 30, 2019
1 parent 35e1c5d commit 9f74650
Show file tree
Hide file tree
Showing 10 changed files with 1,731 additions and 1,734 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ I made the library with a style which would be quite easy to add other cameras (
## Installation

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

## Examples

**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
**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).

## Supported Options

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

**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)

## To Do list and known issues
## To Do list and known issues

- 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)
- 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)
Expand All @@ -170,4 +170,4 @@ I made the library with a style which would be quite easy to add other cameras (

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

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.
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.
3 changes: 1 addition & 2 deletions examples/ESP32_FreeRTOS/Constants.h.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
// replace the following:
#define GOPRO_SSID "__YOUR__CAMERA__NAME__"
#define GOPRO_PASS "__YOUR__CAMERA__PASS__"
#define CAMERA HEROX // your HERO model
#define CAMERA HEROX // your HERO model
uint8_t gopro_mac_address[6]= {1,2,3,4,5,6}; // the MAC address of your GoPro
#define BOARD_NAME "__YOUR__BOARD__NAME__"

#endif
230 changes: 115 additions & 115 deletions examples/ESP32_FreeRTOS/ESP32_FreeRTOS.ino
Original file line number Diff line number Diff line change
Expand Up @@ -7,129 +7,129 @@

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

void setup()
{
gp.enableDebug(&Serial);
xTaskCreate(keep_alive, "keep_alive", 10000, NULL, 1, NULL);
gp.enableDebug(&Serial);
xTaskCreate(keep_alive, "keep_alive", 10000, NULL, 1, NULL);
}

void loop()
{
char in = 0;
if (Serial.available() > 0)
{
in = Serial.read();
}

switch (in)
{
default:
break;

// Connect
case 'C':
gp.begin();
break;

// Turn on and off
case 'T':
gp.turnOn();
break;

case 't':
gp.turnOff();
break;

// Take a picture of start a video
case 'A':
gp.shoot();
break;

// Stop the video
case 'S':
gp.stopShoot();
break;

// Set modes
case 'V':
gp.setMode(VIDEO_MODE);
break;

case 'P':
gp.setMode(PHOTO_MODE);
break;

case 'M':
gp.setMode(MULTISHOT_MODE);
break;

// Change the orientation
case 'u':
gp.setOrientation(ORIENTATION_UP);
break;

case 'd':
gp.setOrientation(ORIENTATION_DOWN);
break;

// Change other parameters
case 'W':
gp.setVideoFov(MEDIUM_FOV);
break;

case 'E':
gp.setFrameRate(FR_120);
break;

case 'f':
gp.setPhotoResolution(PR_11MP_WIDE);
break;

case 'F':
gp.setVideoResolution(VR_1080p);
break;

case 'L':
gp.setTimeLapseInterval(60);
break;

// Localize the camera
case 'O':
gp.localizationOn();
break;

case 'I':
gp.localizationOff();
break;

// Delete some files, be carefull!
case 'l':
gp.deleteLast();
break;

case 'D':
gp.deleteAll();
break;

// Print useful data
case 'p':
gp.printStatus();
break;

// Close the connection
case 'X':
gp.end();
break;
}
char in = 0;
if (Serial.available() > 0)
{
in = Serial.read();
}

switch (in)
{
default:
break;

// Connect
case 'C':
gp.begin();
break;

// Turn on and off
case 'T':
gp.turnOn();
break;

case 't':
gp.turnOff();
break;

// Take a picture of start a video
case 'A':
gp.shoot();
break;

// Stop the video
case 'S':
gp.stopShoot();
break;

// Set modes
case 'V':
gp.setMode(VIDEO_MODE);
break;

case 'P':
gp.setMode(PHOTO_MODE);
break;

case 'M':
gp.setMode(MULTISHOT_MODE);
break;

// Change the orientation
case 'u':
gp.setOrientation(ORIENTATION_UP);
break;

case 'd':
gp.setOrientation(ORIENTATION_DOWN);
break;

// Change other parameters
case 'W':
gp.setVideoFov(MEDIUM_FOV);
break;

case 'E':
gp.setFrameRate(FR_120);
break;

case 'f':
gp.setPhotoResolution(PR_11MP_WIDE);
break;

case 'F':
gp.setVideoResolution(VR_1080p);
break;

case 'L':
gp.setTimeLapseInterval(60);
break;

// Localize the camera
case 'O':
gp.localizationOn();
break;

case 'I':
gp.localizationOff();
break;

// Delete some files, be carefull!
case 'l':
gp.deleteLast();
break;

case 'D':
gp.deleteAll();
break;

// Print useful data
case 'p':
gp.printStatus();
break;

// Close the connection
case 'X':
gp.end();
break;
}
}

void keep_alive(void *parameter)
{
while (1)
{
gp.keepAlive();
}
vTaskDelete(NULL);
}
while (1)
{
gp.keepAlive();
}
vTaskDelete(NULL);
}
3 changes: 1 addition & 2 deletions examples/GoProControl/Constants.h.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
// replace the following:
#define GOPRO_SSID "__YOUR__CAMERA__NAME__"
#define GOPRO_PASS "__YOUR__CAMERA__PASS__"
#define CAMERA HEROX // your HERO model
#define CAMERA HEROX // your HERO model
uint8_t gopro_mac_address[6]= {1,2,3,4,5,6}; // the MAC address of your GoPro
#define BOARD_NAME "__YOUR__BOARD__NAME__"

#endif
Loading

0 comments on commit 9f74650

Please sign in to comment.