kitkat
New Member
Posts: 4
Raspberry Pi: Yes
Other Device: Ipad, dell laptop, dell pc, Samsung netbook
|
Post by kitkat on Aug 6, 2013 4:57:41 GMT -8
Do you have server code template for showing live images from the Pi camera? Would be nice if it was live feed.
|
|
|
Post by SDL on Aug 6, 2013 8:01:18 GMT -8
Kitkat,
Not yet. We just got a Pi Camera in here at the office last week. A live video feed is not in the works, but a periodically updated image is. Basically, you have to write a script to get a picture and then place it in the proper directory on the Pi.
Look in the ExecuteFiles directory in the ExecuteRemoteWebView.py file. It has an example you can easily use. Scroll down to the line "elif (objectServerID == "W-2")"
W-2 will do what you want. You just replace the "RovioImage.jpg" filename with your own generated name. It HAS to be in the LOCALURL directory or web.py won't serve up the image.
Setting your Refresh to 5.0 seconds in RasPiConnect will update the page every 5 seconds.
Hope that helps!
BP
|
|
kitkat
New Member
Posts: 4
Raspberry Pi: Yes
Other Device: Ipad, dell laptop, dell pc, Samsung netbook
|
Post by kitkat on Aug 6, 2013 12:21:03 GMT -8
Thanks, I have managed this with a sudo crontab -e script (found it must be sudo) on the pi which updates every minute */1 and outputs a .jpg file which is then read by W2 works well.
sudo crontab -e */1 * * * * Raspistill -o /home/pi/RasPiConnectServer/static/[filename].jpg
|
|
|
Post by SDL on Aug 6, 2013 13:27:38 GMT -8
Excellent! Post a picture of your screen! Woohoo!
BP
|
|