Hi all, I'm hoping someone has played with this before but perhaps i'm the first.
I have a GoPro HD2 camera with WiFi attachment - It acts as a wireless access point.
I have paired with this, a wireless AP in Client mode - i.e it's acting like a computer connecting to the camera but connects to the network so i can access it via any 'pc' on the network.
The camera is controlled via HTTP GET requests in the form of http:///bacpac/PW?t=&p=%01
I can jump on my PC and enter the string above into a browser and it turns the camera on - Beatutiful i think!
I created an arduino sketch to connect to the camera and turn it on:
#include <SPI.h>
#include <Ethernet.h>
byte mac[] = { 0x00, 0x28, 0x8B, 0x62, 0xC9, 0xED };
byte ip[] = { 10, 5, 5, 110 };
IPAddress server(10,5,5,9); // GoPro
// constants won't change. They're used here to
// set pin numbers:
const int sensorpin = 18; // the number of the pushbutton pin
const int ledPin = 2; // the number of the LED pin
const int solenoid = 3;
boolean movement = 0;
EthernetClient client;
void setup() {
Serial.begin(9600);
// start the Ethernet connection:
Serial.println("Starting Network");
if (Ethernet.begin(mac) == 0) {
Serial.println("Failed to configure Ethernet using DHCP");
// no point in carrying on, so do nothing forevermore:
for(;;)
;
}
// Ethernet.begin(mac,ip);
delay(1000);
Serial.println("Connecting to GoPro");
// Try to get the status of the gopro
if (client.connect(server, 80)) {
Serial.println("connected");
// Make a HTTP request:
Serial.println("Powering on GoPro");
client.println("GET /bacpac/PW?t=blahblah&p=%01 HTTP/1.0");
client.println();
}
else {
// if you didn't get a connection to the server:
Serial.println("connection failed");
}
// initialize the LED pin as an output:
pinMode(ledPin, OUTPUT);
pinMode(solenoid, OUTPUT);
digitalWrite(ledPin, HIGH);
digitalWrite(solenoid, HIGH);
// initialize the pushbutton pin as an input:
pinMode(sensorpin, INPUT);
digitalWrite(sensorpin, LOW);
}
but it bombs out at the client.connect line i.e can't even open port 80 as if there is no IP or there is no physical connection but from the PC i can ping the Arduino and the camera fine.
I know this is a very specific thing and i'm probably strugling for someone to have an answer off the bat but has anyone tried anything like this before?