Summary

  • In this chapter, we built a security monitor service by modifying the ARobot and attaching an onboard laptop with a Web camera. We use this service to capture images from the attached Web camera and display them on a Control Panel Web page. You can also use the Control Panel to control the robot by moving it left, right, forward, backward, or stopping completely.

  • The security monitor service partners with the Web camera service to capture images from the attached Web camera. It also partners with the ARobot services created in Chapter 7. These services are used to drive the ARobot using directional buttons on the control panel Web page.

  • Images are captured from the Web camera every 250 milliseconds, and the result is stored in an array of binary values. The motion detection portion of the service simply compares the binary values from the current frame with the last frame captured to determine if motion has occurred. If it has, then it triggers a notification and sends an e-mail to the e-mail address stored in one of the state variables.

  • An XSLT file named ControlPanel.xslt is used to render the service state as HTML. This also allows the robot owner to access the control panel Web application remotely.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.31.39