How to Automate the Arducam OV2640 with home security system project

Hi all,

My name is Chris and I am very new to programming. I am trying to create a home security system project for my ECE 301 Electrical Engineering course. I am using a Arduino UNO R3 along with a Arducam OV 2640. Right now I have two separate scripts; one for the security system portion that responds to movement, and the other is the source code for the Arducam. When using the Arducam, i am required to use the ArduCam Host V2 application to view the camera feed or pictures.

I am trying to merge the security system code with the Arducam code and enable the Arducam to operate automatically when the sensors of the security system are triggered. I do not want to go into the Arducam Host V2 application each time to receive the camera feed.

Like i said, i am new to programming and im not sure how to implement this. Do i need to create a function or a library to merge the two scripts??????

Any help is appreciated!

Thanks Everyone

Below is the code for the security system and the Arducam.

ArduCam_Actual.ino (17.7 KB)

LCD_security_ver_2.ino (1.89 KB)