The goal for this project is to be able to remotely control a GoPro Hero 4 via an RC Transmitter. This method is going to use the GoPro’s built in Wifi & HTTP API for controlling the device & is inspired by PROTOTYPE: SMALLEST AND CHEAPEST GOPRO REMOTE. If you have a GoPro Hero 3, it might be easier to use the bus port for direct control, a pinout guide can be found here. But since the bus port is disabled on the Hero 4 (thanks GoPro!), we’ll have to use the Wifi method. The Wifi method also works on the Hero 3, so go that route if you’d like the cross-compatibility. This does require some knowledge of electronics & arduino programming.
Let’s get started:
Step 1: Parts
You’re going to need a few components to get this working:
- GoPro Hero 4 (obviously)
- A Drone for GoPro
- ESP8266 Programmable Wifi Module
- FTDI Cable/USB 2 TTL Converter (for flashing the code to ESP8266)
- LD1117V33 3.3v Voltage Regulator
- RC Transmitter/Receiver
Step 2: Code
The ESP8266 is effectively an Arduino with built in Wifi capabilities. This allows us to take advantage of the GoPro’s HTTP API & make requests based on GPIO input. A list of the Wifi Commands that you can make can be found at: https://github.com/KonradIT/goprowifihack/blob/master/HERO4/WifiCommands.md
In my code. I have programmed the ESP8266 to detect whether a button is on or off by decoding the PPM signal of the RC Radio Receiver. Then use timing, to detect how long the button was pressed. If the button is pressed for less than 0.5 seconds, it will trigger the GoPro. If the button is pressed for longer than 0.5 seconds it will cycle through capture modes on the GoPro. This is the best solution I could come up with for FPV drones.
Note: If you don’t have the ability to see the GoPro’s live display, you may want to adjust code for your specific use. Otherwise you won’t know what mode it is in.
Step 3: Wiring the ESP8266 for Flashing
*My FTDI adapter had a 3.3v power rail but was not enough to power the ESP8266 unit. So I suggest to use another 3.3v power source such as an Arduino, or you can use the 5v power rail provided by the FTDI Adapter through a 3.3v voltage regulator.
Flashing Code to ESP8266 using Arduino IDE
To flash the code to the ESP8266, I will be using the Arduino IDE.
- Add this Board Manager URL to your Arduino IDE in the Preferences window (File > Preferences > Additional Board Manager URLS:): arduino.esp8266.com/stable/package_esp8266com_index.json
- Change your board to “Generic ESP8266 Module”
- Connect the FTDI Adapter to the PC via USB. Remember to short the GPIO 0 pin for 2 seconds while powering up to enter programming mode.
- Select the proper COM port for your FTDI device & upload code to the device.
*Sometimes the ESP8266 doesn’t flash properly for whatever reason… I’ve found that rebooting the device and/or restarting the Arduino IDE seems to fix the issue.
Step 4: Wiring It Up & Configuring GoPro
Once the code is flashed, you can wire the ESP8266 to the RC Receiver as shown in the image below:
Now you’ll need to enable Wifi App Mode on your GoPro if you haven’t already. If you have, make sure to match the wifi settings in the code with your GoPro’s wifi settings. You’ll have to use the GoPro app for configuring the Wifi initially. If you need to reset your GoPro’s Wifi Settings, this can be done from the Reset menu, then reconfigured using the GoPro App.
Now everything should be working! You can power on the ESP8266 & give it a test.