This tutorial relies on the use of the Arduino GoPRO libray that can be installed using the Arduino Library Manager.
This library allows the user to fully communicate with a GoPRO camera, but we will use only two very basic functions:
- Turn ON and OFF the camera;
- Start or stop the capture;
The libraries relies on the fact that a connection between the camera (in AP mode) and the board exist.
The library has so the method GoPRO.begin(ssid, pass)
to try a connection. This function in fact returns true
if the connection is established false
otherwise.
The sketch interacts with three buttons:
- Connect/Disconnect (attached to A1);
- Turn ON/OFF the camera (attached to A2);
- Start/Stop Capture (attached to A3);
Pressing the buttons reflects to the status of the three LEDs in such a way:
- Blue LED: when the connect button is pressed, the board tries to establish a connection with the camera. If the connection is successful, the LED will be turned ON. If pressed another time the connection will be stopped and the LED is turned OFF;
- Green LED:when the turn ON/OFF button is pressed, the board sends the
turnOn()
command if the LED is OFF theturnOff()
command otherwise; - Red LED:when the Start/Stop Capture button is pressed, the board sends the
startCapture()
command if the LED is OFF thestopCapture()
command otherwise;
NB: Every command is sent only if the connection between the board and the camera is still active. This can be check using the method checkConnection()
that returns true if the connection is active, false otherwise.
Comments