hlotac
Posts: 3
Joined: Sun Sep 01, 2013 5:46 pm

Web controlled surveillance

Thu Jan 09, 2014 11:24 am

Hi there

I recently got myself some servo motors and a 16 channel PWM board from adafruit in a dream of controlling a quadpod later on. But until then I am trying to experiment with controlling the servos remotely via a web-page.

I have looked through a tutorial on Adafruit wich allows the use of two servo motors, and a laserpointer. Wich is monitored by a web-cam stationed next to it. The whole project is like a cat-laser toy or something.

I have tried to retrofit this into my design wich is a kind of surveillance with the use of my rPi camera, raspistill and mjpeg streaming, but when I try to control the servos with the web-page supplied in the cat laser-toy project I am getting a few errors when I start the listening server.

Code: Select all

Debugging middleware caught exception in streamed response at a point where response headers were already     sent.
Traceback (most recent call last):
  File "/usr/share/pyshared/werkzeug/wsgi.py", line 513, in next
    return self._next()
  File "/usr/share/pyshared/werkzeug/wrappers.py", line 829, in iter_encoded
    for item in self.response:
TypeError: 'Response' object is not iterable
After some searching all I am getting is some sort of encoding problem, but I do not know where the problem lies. The site itself is using utf-8 encoding, but I think I am a little over my head here.

I am basically trying to do this as simple as possible:

Have 2 servo motors, one mounted to the other so I can get Y / X control over the camera wich I am also mounting to the one servo.

Have a web-page wich displays the mjpeg stream.

Two buttons wich each control + / - on the Y and X axis.

I am struggling to find out how my web-page can interact with my hardware? Node.js keeps popping up here and there, but I feel it's a bit too advanced for my project.

Are there any beginners tutorials out there, on how to interact with the pi's connected hardware through a web-page? Specifically servos?

Return to “Automation, sensing and robotics”