<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Car DVR with Raspberry Pi 2 and Pi Camera Board</title><link>/products/raspberry-pi/raspberrypi_projects/b/blog/posts/car-dvr-with-raspberry-pi-2-and-pi-camera-board</link><description>The Raspberry Pi Raspberry Pi has been a huge phenomenon in the maker scene, spawning a wide range of accessories, add-ons and even specialised &amp;#39;Hats&amp;#39;. One of the most underappreciated peripherals would have to be the small Raspberry Pi camera board Ra</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Car DVR with Raspberry Pi 2 and Pi Camera Board</title><link>https://community.element14.com/products/raspberry-pi/raspberrypi_projects/b/blog/posts/car-dvr-with-raspberry-pi-2-and-pi-camera-board</link><pubDate>Wed, 09 Nov 2016 22:18:39 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:cbac21f8-7b0b-4f25-b076-6222e96dadc2</guid><dc:creator>G7OEA</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Can you help out a total noob and most defiantly not a programmer. the last time i did any coding I was using a zx spectrum, when it was new btw.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I am trying to use his code on a pi zero with the camera. I can get the camera to show an image on the screen using the following code.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;from picamera import PiCamera&lt;/p&gt;&lt;p&gt;from time import sleep&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;camera = PiCamera()&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;camera.start_preview()&lt;/p&gt;&lt;p&gt;sleep(10)&lt;/p&gt;&lt;p&gt;camera.stop_preview()&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;When I tried the code posted i got indent errors so tabbed in the code where python 3 told me. the code &amp;quot;runs&amp;quot; as in it doesn&amp;#39;t throw up any errors. the code I am using is below. I have tweaked it to use the board pin layout rather than bcm. This was so I know what pins i was using and also this is why I changed the gpio pin to 21&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;import datetime&lt;/p&gt;&lt;p&gt;import picamera&lt;/p&gt;&lt;p&gt;import RPi.GPIO as GPIO&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;GPIO.setmode(GPIO.BOARD)&lt;/p&gt;&lt;p&gt;GPIO.setup(21, GPIO.IN, pull_up_down = GPIO.PUD_UP)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;while True:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GPIO.wait_for_edge(21, GPIO.FALLING)&lt;/p&gt;&lt;p&gt;dvrname = datetime.datetime.now().strftime(&amp;quot;%y%m%d_%H%M%S&amp;quot;)&lt;/p&gt;&lt;p&gt;with picamera.PiCamera() as camera:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; camera.resolution = (1920, 1080)&lt;/p&gt;&lt;p&gt;camera.start_preview()&lt;/p&gt;&lt;p&gt;camera.start_recording(&amp;#39;/home/pi/&amp;#39; + dvrname + &amp;#39;.h264&amp;#39;)&lt;/p&gt;&lt;p&gt;GPIO.wait_for_edge(21, GPIO.RISING)&lt;/p&gt;&lt;p&gt;camera.stop_recording()&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;GPIO.cleanup()&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Can anyone see where i am going wrong? this code is ideal for my drone project. Rather than a gopro I am using the pi and the video preview plan to send to my video osd ground link.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanking you kinndly,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Phil&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=21169&amp;AppID=84&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Car DVR with Raspberry Pi 2 and Pi Camera Board</title><link>https://community.element14.com/products/raspberry-pi/raspberrypi_projects/b/blog/posts/car-dvr-with-raspberry-pi-2-and-pi-camera-board</link><pubDate>Tue, 23 Jun 2015 19:43:45 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:cbac21f8-7b0b-4f25-b076-6222e96dadc2</guid><dc:creator>balearicdynamics</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Can&amp;#39;t say other than repeating DAB. Great post and very nice project. I am too asking what about the cable length; I am thinking to use a different cable with two flat connectors on the side and a 1 mt long cable but I am wondering too if this is possible.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Enrico&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=21169&amp;AppID=84&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Car DVR with Raspberry Pi 2 and Pi Camera Board</title><link>https://community.element14.com/products/raspberry-pi/raspberrypi_projects/b/blog/posts/car-dvr-with-raspberry-pi-2-and-pi-camera-board</link><pubDate>Tue, 23 Jun 2015 19:11:22 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:cbac21f8-7b0b-4f25-b076-6222e96dadc2</guid><dc:creator>DAB</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Great post.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Did you notice any timing issues with the longer cable to the camera?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I wonder how long you could go before you ran into problems?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;DAB&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=21169&amp;AppID=84&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>