Skip to content

Commit

Permalink
support for HERO8 and MAX
Browse files Browse the repository at this point in the history
  • Loading branch information
aster94 committed Mar 24, 2020
1 parent 2323f38 commit ce48bd8
Show file tree
Hide file tree
Showing 14 changed files with 1,728 additions and 1,932 deletions.
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BasedOnStyle: Chromium
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.**
.pio/**
.vscode/**
.travis.yml
lib/**
test/**
include/**
platformio.ini
examples/*/Constants.h
43 changes: 24 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# GoPro Control Arduino

This is a library to interface with GoPro cameras over WiFi, just press a button and control your GoPro action camera using an Arduino!
This is a library to interface with GoPro cameras over WiFi using Arduino!

![Alt text](/extras/gopro3_and_nodemcu.jpg?raw=true "GoPro3")

![Alt text](/extras/gopros_and_esps.jpg?raw=true "GoPro4")

Have you ever thought about the possibility to control your action camera with your Arduino? Well if you are here because you googled that you may be interested in watching this video
Here there is a short video that shows the potential of the library

[![Alt text](https://img.youtube.com/vi/PuM-ZQ2tMW0/0.jpg)](https://www.youtube.com/watch?v=PuM-ZQ2tMW0)

Expand All @@ -23,7 +23,7 @@ Have you ever thought about the possibility to control your action camera with y
- change photo and video resolution
- turn the localization on/off
- change the orientation
- more?
- more

## Supported boards:

Expand All @@ -33,7 +33,7 @@ Have you ever thought about the possibility to control your action camera with y
- MKR WiFi 1010
- MKR VIDOR 4000
- UNO WiFi Rev.2
- any arduino boards (UNO, nano, 101, etc.) attached to an ESP8266 (ESP01) using AT commands with [this library](https://github.com/bportaluri/WiFiEsp)
- any other boards (UNO, NANO, bluepill) attached to an ESP01 using AT commands with [this library](https://github.com/bportaluri/WiFiEsp)

## Supported cameras:

Expand All @@ -43,6 +43,8 @@ Have you ever thought about the possibility to control your action camera with y
- HERO6
- HERO7
- FUSION
- HERO8
- MAX

I made the library with a style which would be quite easy to add other cameras (not only GoPro). I would be very happy to accept pull requests πŸ˜ƒ

Expand All @@ -52,7 +54,7 @@ I made the library with a style which would be quite easy to add other cameras (
- Go to Tools > Manage libraries
- Search for `GoProControl`
- PlatformIO:
- From command line: run `pio lib install "GoProControl"`
- From command line: run `pio lib install "GoProControl"` or use the ID `pio lib install 5599`
- Or if you prefer a GUI from [Platformio IDE](https://docs.platformio.org/en/latest/librarymanager/)
- Manually:
- `cd $HOME/Arduino/libraries` ([see Arduino library paths for other operating systems](https://www.arduino.cc/en/hacking/libraries))
Expand All @@ -61,11 +63,13 @@ 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
Start with the `GoProControl.ino` to get used with the library

**Important:** Before uploading to your board you have to change the SSID, password and camera model from `Secrets.h`

## Supported Options

| Mode | HERO3 | HERO4,5,6,7 |
| Mode | HERO3 | HERO4 and beyond |
| --- | :---: | :---: |
| VIDEO_MODE | βœ” | βœ” |
| PHOTO_MODE | βœ” | βœ” |
Expand All @@ -85,13 +89,13 @@ I made the library with a style which would be quite easy to add other cameras (
| MULTISHOT_TIMELAPSE_MODE | | βœ” |
| MULTISHOT_NIGHTLAPSE_MODE | | βœ” |

| Orientation | HERO3 | HERO4,5,6,7 |
| Orientation | HERO3 | HERO4 and beyond |
| --- | :---: | :---: |
| ORIENTATION_UP | βœ” | βœ” |
| ORIENTATION_DOWN | βœ” | βœ” |
| ORIENTATION_AUTO | | βœ” |

| Video Resolution | HERO3 | HERO4,5,6,7 |
| Video Resolution | HERO3 | HERO4 and beyond |
| --- | :---: | :---: |
| VR_4K | | βœ” |
| VR_2K | | βœ” |
Expand All @@ -104,14 +108,14 @@ I made the library with a style which would be quite easy to add other cameras (
| VR_720p | βœ” | βœ” |
| VR_WVGA | βœ” | βœ” |

| Field Of View | HERO3 | HERO4,5,6,7 |
| Field Of View | HERO3 | HERO4 and beyond |
| --- | :---: | :---: |
| WIDE_FOV | βœ” | βœ” |
| MEDIUM_FOV | βœ” | βœ” |
| NARROW_FOV | βœ” | βœ” |
| LINEAR_FOV | | βœ” |

| Frame Rate | HERO3 | HERO4,5,6,7 |
| Frame Rate | HERO3 | HERO4 and beyond |
| --- | :---: | :---: |
| FR_240 | βœ” | βœ” |
| FR_120 | βœ” | βœ” |
Expand All @@ -128,12 +132,12 @@ I made the library with a style which would be quite easy to add other cameras (
| FR_12p5 | βœ” | |
| FR_12 | βœ” | |

| Video Encoding | HERO3 | HERO4,5,6,7 |
| Video Encoding | HERO3 | HERO4 and beyond |
| --- | :---: | :---: |
| NTSC | βœ” | βœ” |
| PAL | βœ” | βœ” |

| Photo Resolution | HERO3 | HERO4,5,6,7 |
| Photo Resolution | HERO3 | HERO4 and beyond |
| --- | :---: | :---: |
| PR_12MP_WIDE | | βœ” |
| PR_12MP_MEDIUM | | βœ” |
Expand All @@ -147,7 +151,7 @@ I made the library with a style which would be quite easy to add other cameras (
| PR_5MP_WIDE | βœ” | βœ” |
| PR_5MP_MEDIUM | | βœ” |

| Time Lapse | HERO3 | HERO4,5,6,7 |
| Time Lapse | HERO3 | HERO4 and beyond |
| --- | :---: | :---: |
| 60 | βœ” | βœ” |
| 30 | βœ” | βœ” |
Expand All @@ -156,26 +160,27 @@ I made the library with a style which would be quite easy to add other cameras (
| 1 | βœ” | βœ” |
| 0.5 | βœ” | βœ” |

| Continuous Shot | HERO3 | HERO4,5,6,7 |
| Continuous Shot | HERO3 | HERO4 and beyond |
| --- | :---: | :---: |
| 10 | βœ” | |
| 5 | βœ” | |
| 3 | βœ” | |
| 0 | βœ” | |

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

- ESP8266 can't get the BSSID of the camera. So if you want to turn it on you need to manually pass it to the constructor, [see the docs](https://arduino-esp8266.readthedocs.io/en/latest/esp8266wifi/station-class.html#bssid)
- There is no way to know if an HERO3 camera is on or off so the function `isOn()` will always return `true` on this camera
- It is possible to get a lot of info (mode, fow, battery) from HERO4 and newer camera but this is not implemented, [see here](https://github.com/KonradIT/goprowifihack/blob/master/HERO5/HERO5-Commands.md#gopro-hero5-commands-status-and-notes) - PR are welcome
- It is possible to get a lot of info (mode, fow, battery) from HERO4 and newer camera but this is not implemented [see here](https://github.com/KonradIT/goprowifihack/blob/master/HERO5/HERO5-Commands.md#gopro-hero5-commands-status-and-notes), a Json parser should be used, like [ArduinoJson](https://arduinojson.org/) - PR are welcome
- BLE not implemented: the ESP32 core is not enough stable, 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)
- No confirm pairing for HERO4: [see here](https://github.com/KonradIT/goprowifihack/blob/master/HERO4/WifiCommands.md#code-pairing) - PR are welcome
- The arduino class `String()` is known to cause memory leaks but in hours and hours of use of this library I never had a single problem
- on STM32 there is a known bug with [WiFiEsp](https://github.com/bportaluri/WiFiEsp/pull/179)

## Reference

All the commands came from [here](https://github.com/KonradIT/goprowifihack)
All the commands came from the great work of [KonradIT](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
Loading

4 comments on commit ce48bd8

@KonradIT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ended up buying the MAX? XD

@aster94
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes ahahahahahah I took it a few days before Italy get into quarantine and I don't know when I will use it πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚πŸ˜‚

@KonradIT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol, I'm quarantined here in Spain as well and I just use the MAX and 8 to timelapse from my balcony. Best of luck man!

@aster94
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You too man πŸ˜„ I think I will start with timelapses too 😎

Please sign in to comment.