Australia
Asked — Edited

Servo Mounted Security Camera (2-Axis)

I am well on the way in the programming of my security camera. Camera servo tracking is enabled for the two servos- the horizontal and vertical axis. When one of the two servos moves to follow movement the alarm will be activated, starting both the Alert and Snapshot scripts. Here are the scripts I have written for the camera:


System On Script

ControlCommand("Security Script 1", ScriptStart)
ControlCommand("Security Script 2", ScriptStart)
ControlCommand("Camera", PauseOff)

Security Script 1*

Servo(D1, 35)
Sleep(1)
Say(Security System Active)
WaitForServoMove(D1)
ControlCommand("Security Script 2", ScriptStop)
ControlCommand("Movement Detected Script", ScriptStart)

*Horizontal axis

Security Script 2*

Servo(D2 ,35)
Sleep(1)
WaitForServoMove(D2)
ControlCommand("Security Script 1", ScriptStop)
ControlCommand("Movement Detected Script", ScriptStart)

*Vertical axis

Movement Detected Script

ControlCommand("Alert Script", ScriptStart)
ControlCommand("Snapshot Script", ScriptStart)

Alert Script

ControlCommand("Alert Script", ScriptStop)
ControlCommand("Snapshot Script", ScriptStop)
ControlCommand("Camera Snapshot", PauseOn)
Say(Security System Off) 

Snapshot Script

ControlCommand("Camera Snapshot", PauseOff)
Sleep(2001)
ControlCommand("Camera Snapshot", PauseOn)

Stop Script

ControlCommand("Alert Script", ScriptStop)
ControlCommand("Snapshot Script", ScriptStop)
ControlCommand("Camera Snapshot", PauseOn)
Say(Security System Off)

Continuous Scan Script

ServoSpeed(D1, 35)
: Start
Sleep(100)
Servo(D1, 1)
Sleep(3000)
Servo(D1, 70)
Sleep(3000)
Goto(Start)

Scan Left Script

ServoSpeed(D1, 35)
Servo(D1, 1)

Scan Right Script

ServoSpeed(D1, 35)
Servo(D1, 70)

Scan Stop Script

ControlCommand("Scan Script", ScriptStop)
Servo(D1, 35)
ServoSpeed(D1, 25)

NB: I am unsure what speed the values in the ServoSpeed command represent. The current values are merely estimates

There are all the scripts neccessary for the camera functionality. There are others but they are simply for the joystick and other components.

After a while I decided that I would use a joystick to start and stop certain scripts, toggle the pause on the camera and camera snapshots and also to rotate the two servos. But because of the commands I have used in the Security Script when I overide the camera servo tracking it activates the alarm. I could just stop the script every time I wanted to rotate it but I will wait until DJ includes the Motion Found and Lost functions of the Camera.


ARC Pro

Upgrade to ARC Pro

Elevate your robot's capabilities to the next level with Synthiam ARC Pro, unlocking a world of possibilities in robot programming.

Australia
#1  

Woops. I don't know how I put this thread in the wrong catergory. I will copy it right away

PRO
Synthiam
#2  

It's not a robot project. It's related to script/ARC, belongs in here:)

Project showcase is for a video/pics of a working robot (i.e. project)

Australia
#3  

Ahhhh. Sadly I already copied it to Project Showcase. Can you use your spectacular admin powers to delete it?

PRO
Synthiam
#4  

I wish i had admin powers. I have hax0r powers. There is no admin interface for this:) We go right into the database and delete haha

Australia
#5  

It's already gone. That was fast. You do have powers then and not just ones that affect the computing world. Can you predict the numbers for the next lottery?

Australia
#7  

Perhaps you can build a robot that can. Hack one of this old fair-ground fortune tellers and you will know everything

Australia
#8  

Does anyone have any suggestions on how I will be able to extend the programming of my camera or add to it?