Welcome new user! You can search existing questions and answers without registering, but please register to post new questions and receive answers. Note that due to large amounts of spam attempts, your first three posts will be manually moderated, so please be patient.
Welcome to JeVois Tech Zone, where you can ask questions and receive answers from other members of the community.

I am trying cause my Arduino UNO to trigger the recording of Video through the Save Video Module in Jevois.

+2 votes
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;
}
asked Mar 4 in User questions by ahh2222 (140 points)

1 Answer

0 votes

You need to remove the "setpar serout" that is in most of your strings. Basically, you should println() this to JeVois:

setmapping2 YUYV 640 480 30.0 JeVois SaveVideo

to setup, then 

streamon

to start video streaming, etc

answered Mar 11 by JeVois (46,200 points)
...