I am trying cause my Arduino UNO to trigger the recording of Video through the Save Video Module in Jevois and save it on the SD card in the Camera. I want to trigger the start of recording and the end of recording using a button that I press on my Arduino UNO. Copied below is the code I am using. It is displaying the message in the Arduino Serial Monitor but it is not triggering the camera to begin recording or stop recording.
#define rxPin 0
#define txPin 1
#define ledPin 13
int led = 13;
int button = 12;
int ledState = LOW;
int buttonCurrent;
int buttonPrevious = HIGH;
byte pinState = 0;
String SetUp = "setpar serout setmapping2 YUYV 640 480 30.0 JeVois SaveVideo";
String StreamOn = "setpar serout streamon";
String Start = "setpar serout start";
String Stop = "setpar serout stop";
String StreamOff = "setpar serout streamoff";
void setup()
{
Serial.begin(115200);
pinMode(button, INPUT);
pinMode(led, OUTPUT);
// define pin modes for tx, rx, led pins:
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT);
pinMode(ledPin, OUTPUT);
// set the data rate for the SoftwareSerial port
Serial.println(SetUp);
}
void loop()
{
buttonCurrent = digitalRead(button);
if (buttonCurrent == HIGH && buttonPrevious == LOW)
{
if (ledState == LOW)
{
ledState = HIGH;
Serial.println(StreamOn);
Serial.println(Start);
}
else
{
ledState = LOW;
Serial.println(Stop);
Serial.println(StreamOff);
}
}
digitalWrite(led, ledState);
buttonPrevious = buttonCurrent;
}