GoProControl

A library that makes using GoPro Cameras a breeze.


Keywords
device, control, arduino, arduino-library, esp, esp32, esp8266, gopro, hero, mkr, wifi
License
GPL-3.0
Install
platformio lib install 5599

Documentation

GoPro Control Arduino

This is a library to interface with GoPro cameras over WiFi using Arduino!

Alt text

Alt text

Here there is a short video that shows the potential of the library

Alt text

Supported actions

  • take a picture
  • start and stop a video
  • change the mode (photo, video, etc)
  • delete last file
  • format the SD
  • turn the camera on/off
  • change the field of view (FOV)
  • change frame rate
  • change photo and video resolution
  • turn the localization on/off
  • change the orientation
  • more

Supported boards:

  • ESP32
  • ESP8266
  • MKR1000
  • MKR WiFi 1010
  • MKR VIDOR 4000
  • UNO WiFi Rev.2
  • any other boards (UNO, NANO, bluepill) attached to an ESP01 using AT commands with this library

Supported cameras:

  • HERO3
  • HERO4
  • HERO5
  • 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 πŸ˜ƒ

Installation

  • Arduino IDE:
    • Go to Tools > Manage libraries
    • Search for GoProControl
  • PlatformIO:
    • 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
  • Manually:

Examples

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 and beyond
VIDEO_MODE βœ” βœ”
PHOTO_MODE βœ” βœ”
BURST_MODE βœ” βœ”
TIMELAPSE_MODE βœ” βœ”
TIMER_MODE βœ” βœ”
PLAY_HDMI_MODE βœ” βœ”
MULTISHOT_MODE βœ”
VIDEO_SUB_MODE βœ”
VIDEO_PHOTO_MODE βœ”
VIDEO_TIMELAPSE_MODE βœ”
VIDEO_LOOPING_MODE βœ”
VIDEO_TIMEWARP_MODE βœ”
PHOTO_SINGLE_MODE βœ”
PHOTO_NIGHT_MODE βœ”
MULTISHOT_BURST_MODE βœ”
MULTISHOT_TIMELAPSE_MODE βœ”
MULTISHOT_NIGHTLAPSE_MODE βœ”
Orientation HERO3 HERO4 and beyond
ORIENTATION_UP βœ” βœ”
ORIENTATION_DOWN βœ” βœ”
ORIENTATION_AUTO βœ”
Video Resolution HERO3 HERO4 and beyond
VR_4K βœ”
VR_2K βœ”
VR_2K_SuperView βœ”
VR_1440p βœ”
VR_1080p_SuperView βœ”
VR_1080p βœ” βœ”
VR_960p βœ” βœ”
VR_720p_SuperView βœ”
VR_720p βœ” βœ”
VR_WVGA βœ” βœ”
Field Of View HERO3 HERO4 and beyond
WIDE_FOV βœ” βœ”
MEDIUM_FOV βœ” βœ”
NARROW_FOV βœ” βœ”
LINEAR_FOV βœ”
Frame Rate HERO3 HERO4 and beyond
FR_240 βœ” βœ”
FR_120 βœ” βœ”
FR_100 βœ” βœ”
FR_90 βœ”
FR_80 βœ”
FR_60 βœ” βœ”
FR_50 βœ” βœ”
FR_48 βœ” βœ”
FR_30 βœ” βœ”
FR_25 βœ” βœ”
FR_24 βœ”
FR_15 βœ”
FR_12p5 βœ”
FR_12 βœ”
Video Encoding HERO3 HERO4 and beyond
NTSC βœ” βœ”
PAL βœ” βœ”
Photo Resolution HERO3 HERO4 and beyond
PR_12MP_WIDE βœ”
PR_12MP_MEDIUM βœ”
PR_12MP_NARROW βœ”
PR_12MP_LINEAR βœ”
PR_11MP_WIDE βœ” βœ”
PR_8MP_WIDE βœ” βœ”
PR_8MP_MEDIUM βœ”
PR_7MP_WIDE βœ”
PR_7MP_MEDIUM βœ”
PR_5MP_WIDE βœ” βœ”
PR_5MP_MEDIUM βœ”
Time Lapse HERO3 HERO4 and beyond
60 βœ” βœ”
30 βœ” βœ”
10 βœ” βœ”
5 βœ” βœ”
1 βœ” βœ”
0.5 βœ” βœ”
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 or here for HERO3 and here for HERO4 and newer

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
  • 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, a Json parser should be used, like ArduinoJson - PR are welcome
  • BLE not implemented: the ESP32 core is not enough stable, especially, if used together with wifi: see here
  • No confirm pairing for HERO4: see here - 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

Reference

All the commands came from the great work of KonradIT

The idea of making a GoPro library for arduino comes from another library which works only on arduino WiFi boards and only with GoPro HERO3