<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>raspberry pi &#8211; Kartik Nanda, Engineering AI</title>
	<atom:link href="https://www.kartiknanda.com/tag/raspberry-pi/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.kartiknanda.com</link>
	<description>AI algorithms, how-to guides, thoughts</description>
	<lastBuildDate>Mon, 10 Aug 2020 23:13:35 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.5.1</generator>

<image>
	<url>https://www.kartiknanda.com/wp-content/uploads/2020/07/cropped-site_icon-2-32x32.jpg</url>
	<title>raspberry pi &#8211; Kartik Nanda, Engineering AI</title>
	<link>https://www.kartiknanda.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Setting up the Pi is easy</title>
		<link>https://www.kartiknanda.com/raspberry-pi-setup/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=raspberry-pi-setup</link>
					<comments>https://www.kartiknanda.com/raspberry-pi-setup/#respond</comments>
		
		<dc:creator><![CDATA[Kartik Nanda]]></dc:creator>
		<pubDate>Fri, 24 Jul 2020 01:32:30 +0000</pubDate>
				<category><![CDATA[AI on Pi]]></category>
		<category><![CDATA[Highlights]]></category>
		<category><![CDATA[ai]]></category>
		<category><![CDATA[raspberry pi]]></category>
		<guid isPermaLink="false">http://www.kartiknanda.com/?p=1075</guid>

					<description><![CDATA[<p>This is the first in a series of posts on how to run AI on the Raspberry Pi (AI on Pi). The first step &#8211; setting up the Raspberry Pi. The final goal is to use the Pi to run a deep learning application. This could be vision related – example, recognizing an event from images/video feed, using Convolutional Neural&#8230;</p>
<p>The post <a rel="nofollow" href="https://www.kartiknanda.com/raspberry-pi-setup/">Setting up the Pi is easy</a> appeared first on <a rel="nofollow" href="https://www.kartiknanda.com">Kartik Nanda, Engineering AI</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>This is the first in a series of posts on how to run AI on the Raspberry Pi (AI on Pi). The first step &#8211; setting up the Raspberry Pi. The final goal is to use the Pi to run a deep learning application. This could be vision related – example, recognizing an event from images/video feed, using Convolutional Neural Nets (CNNs). It could also be audio related, so NLP using RNNs, but that is for a later time.</p>



<h2>The main goals:</h2>



<ul><li>Capture images / video using a camera (sensor) connected to the Pi</li><li>AI algo executes on the Pi</li><li>Result is communicated to “Hub” using BT, Wifi etc. Hub could be another computer, IoT Hub, or the Cloud.</li></ul>



<p>Since I have never worked with the Raspberry Pi previously, let’s start at the very beginning.</p>



<h3>Hardware:</h3>



<ul><li>Raspberry Pi 4, 4GB version (bought the <a href="https://www.canakit.com/raspberry-pi-4-starter-kit.html">Canakit Raspberry Pi 4 Starter Kit</a>)</li></ul>



<ul><li>OV5647 5.0MP Camera Module (bought at <a href="https://dlscorp.com/shop/ov5647-5-0-mp-raspberry-pi-compatible-camera-modules/">dlscorp.com</a> site)<br>The OV5647 module is the older version. There is a new <a href="https://www.raspberrypi.org/products/camera-module-v2/">official camera module</a>, but I decided to go with the older version for two reasons – cost and 5MP (vs 8MP in V2) is plenty for AI applications. Important details – needs to be a CSI module, and comes with a replaceable lens mount (M12)</li></ul>



<ul><li>Camera lens (bought different lenses from dlscorp)</li></ul>



<ul><li>Monitor – used an old monitor I had from years ago. The Pi connects to a monitor using a micro-HDMI port. The kit includes a micro-HDMI to HDMI cable, but I needed to buy a micro-HDMI to VGA adapter for my Monitor.</li></ul>



<ul><li>Keyboard and mouse – used an old keyboard I had laying around</li></ul>



<h3>Software:</h3>



<ul><li>Used the standard NOOBS (preloaded on the micro SD card), and the full Raspbian install. Nothing fancy, yet.</li></ul>



<h2>Step 1: Connect the System</h2>



<div class="wp-block-image"><figure class="alignright size-medium is-resized"><img loading="lazy" src="http://www.kartiknanda.com/wp-content/uploads/2020/07/raspberry_pi_setup-225x300.jpg" alt="Raspberry Pi setup with a camera facing out a window" class="wp-image-1076" width="243" height="331"/></figure></div>



<p>There are many excellent walk throughs – see <a href="https://projects.raspberrypi.org/en/projects/raspberry-pi-getting-started">here</a> or <a href="https://www.youtube.com/watch?v=BpJCAafw2qE">here</a>. The basics are simple enough – connect the display, keyboard and mouse, and the power, and follow the onscreen prompts. There are a couple of things I would like to point out though. One, setup SSH and VNC access to the Pi, so you can connect to it from a remote computer and don’t need the dedicated mouse, keyboard and monitor. This will be especially useful during deployment of the application. The second thing – <a href="https://www.raspberrypi.org/documentation/raspbian/updating.md">update the software</a>. Use “sudo apt-get update” and “sudo apt-get upgrade”.</p>



<p>Once the system is operational, do take the time to explore, browse the web etc. Marvel at a simple yet very complete computer.</p>



<h2>Step 2: Python Setup</h2>



<p>There are other languages, of course, but Python is the language of choice. Python2 and Python3 come pre-installed, with a bunch of packages. The first thing is the virtual environment setup – extremely important given the stand-alone nature of the intended application. The application should not break because of an update a couple of years out. I used <a href="https://virtualenv.pypa.io/en/latest/">virtualenv</a> – <a href="https://www.youtube.com/watch?v=N5vscPTWKOk">here</a> is a good intro.</p>



<p>I spent some time (a little) trying to research the “best” editor but realize that the Pi is not necessarily where I will develop the code. That can be done on a laptop or in the cloud. So, for now I am using Thonny, which came pre-installed. I have not yet written a lot of python on the Pi, will see how it goes over the next few days/weeks – might yet change my mind. </p>



<p>Try out a simple program, ensure that python is up and running. In the next post, the camera setup.</p>
<p>The post <a rel="nofollow" href="https://www.kartiknanda.com/raspberry-pi-setup/">Setting up the Pi is easy</a> appeared first on <a rel="nofollow" href="https://www.kartiknanda.com">Kartik Nanda, Engineering AI</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.kartiknanda.com/raspberry-pi-setup/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
