{"id":175,"date":"2016-04-27T21:55:37","date_gmt":"2016-04-27T20:55:37","guid":{"rendered":"http:\/\/eoghan.me.uk\/notes\/?p=175"},"modified":"2021-10-15T11:38:31","modified_gmt":"2021-10-15T10:38:31","slug":"setup-raspberry-pi","status":"publish","type":"post","link":"https:\/\/eoghan.me.uk\/notes\/2016\/04\/27\/setup-raspberry-pi\/","title":{"rendered":"Set Up Raspberry Pi"},"content":{"rendered":"<p>There are a huge number of tutorials on the Net, showing you how to set up your Raspberry Pi &#8211; but, briefly, the process I went through was:<\/p>\n<h2>Basic set up<\/h2>\n<ol>\n<li><a href=\"https:\/\/www.raspberrypi.org\/learning\/software-guide\/\">Set up your Raspberry Pi OS<\/a>, and boot the Raspberry Pi up.<\/li>\n<li>After booting up your Raspberry Pi with a freshly configured card, the new on-screen setup process will take you through most of the following. But you can also set them manually:\n<ol style=\"list-style-type: lower-alpha;\">\n<li>Open the config menu (in the <abbr title=\"Graphical User Interface\">GUI<\/abbr>: <em>Raspberry Menu<\/em> &gt; Preferences &gt; Raspberry Pi Configuration)\n<ol style=\"list-style-type: lower-roman;\">\n<li>Timezone: In the &#8216;Localisation&#8217; tab, click &#8216;Set Timezone&#8230;&#8217; to select your Area and Location.<\/li>\n<li>Change password: In the &#8216;System&#8217; tab, click &#8216;Change Password&#8230;&#8217; and change it from the default password of &#8216;raspberry&#8217;<\/li>\n<li>Boot: Also in the &#8216;System&#8217; tab, in the &#8216;Boot&#8217; section, select &#8216;To CLI&#8217; (generally my projects run from the Command Line Interface, not the &#8216;Desktop&#8217; graphical user interface)<\/li>\n<li>Secure connection: In the &#8216;Interfaces&#8217; tab, in the &#8216;SSH&#8217; section, tick &#8216;Enabled&#8217;.<\/li>\n<\/ol>\n<\/li>\n<li>Update the system software and firmware to the latest versions by running the following Terminal commands (launching Terminal from the <abbr title=\"Graphical User Interface\">GUI<\/abbr>&#8216;s menubar):\n<pre class=\"lang:sh decode:true  \">sudo apt update\nsudo apt full-upgrade\n<\/pre>\n<\/li>\n<\/ol>\n<\/li>\n<li>Open the config menu (in the <abbr title=\"Graphical User Interface\">GUI<\/abbr>: <em>Raspberry Menu<\/em> &gt; Preferences &gt; Raspberry Pi Configuration)\n<ol style=\"list-style-type: lower-alpha;\">\n<li>Boot: Also in the &#8216;System&#8217; tab, in the &#8216;Boot&#8217; section, select &#8216;To CLI&#8217; (generally my projects run from the Command Line Interface, not the &#8216;Desktop&#8217; graphical user interface)<\/li>\n<li>Secure connection: In the &#8216;Interfaces&#8217; tab, in the &#8216;SSH&#8217; section, tick &#8216;Enabled&#8217;.<\/li>\n<\/ol>\n<\/li>\n<li>Reboot the Pi: (in the GUI: <em>Raspberry Menu<\/em> &gt; &#8216;Shutdown &#8230;&#8217;. In the pop-up window, click the &#8216;Reboot&#8217; button.<\/li>\n<\/ol>\n<h2>Editing from a Mac<\/h2>\n<p>It was much easier to use my Mac to edit the Pi&#8217;s python scripts, than to edit them on the Pi.<\/p>\n<p>I connected to the Pi in two ways &#8211; but first, check the \u2018Raspberry Pi Configuration\u2019 window, in the &#8216;Interfaces&#8217; tab, to make sure that &#8216;SSH&#8217; is Enabled.<\/p>\n<ol>\n<li>On the Pi, check its IP address:\n<pre class=\"lang:sh decode:true \">ifconfig<\/pre>\n<\/li>\n<li>Launch the Terminal application on the Mac, and connect to the Pi&#8217;s username and IP address, e.g.:\n<pre class=\"lang:sh decode:true \">ssh pi@192.168.0.15<\/pre>\n<p>or, if you&#8217;ve <a href=\"http:\/\/eoghan.me.uk\/notes\/2016\/04\/09\/rpi-wifi-wpa-supplicant#hostname\">set up a unique hostname<\/a> for your Pi, you can use that. E.g.:<\/p>\n<pre class=\"lang:sh decode:true \">ssh pi@teamtrack.local<\/pre>\n<\/li>\n<li>Use the Mac&#8217;s Finder to mount the Pi&#8217;s volume:\n<ol>\n<li>Install Netatalk, using the Pi&#8217;s Terminal command (a one-time setup):\n<pre class=\"lang:sh decode:true \">sudo apt-get install netatalk\n<\/pre>\n<\/li>\n<li>A recent change means you now have to edit the afp.conf file to define a home directory. Full instructions are at: <a href=\"https:\/\/pimylifeup.com\/raspberry-pi-afp\/\">How to Setup a Raspberry Pi AFP Server<\/a><\/li>\n<li>From the Mac Finder&#8217;s &#8216;Go&#8217; menu, select &#8216;Connect to Server&#8230;&#8217;<\/li>\n<li>Enter the Server Address, e.g.:\n<pre class=\"lang:sh decode:true\">afp:\/\/192.168.0.15<\/pre>\n<p>or, if you&#8217;ve <a href=\"http:\/\/eoghan.me.uk\/notes\/2016\/04\/09\/rpi-wifi-wpa-supplicant#hostname\">set up a unique hostname<\/a> for your Pi, you can use that. E.g.:<\/p>\n<pre class=\"lang:sh decode:true \">afp:\/\/teamtrack.local<\/pre>\n<\/li>\n<li>Enter the username (default is &#8216;pi&#8217;), and the system password you set in the &#8216;Basic Setup&#8217; section.<\/li>\n<li>Click the &#8216;Connect&#8217; button.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>The Pi then mounts as a normal volume, and you can edit the code in your favourite editor.<\/p>\n<h2>Set up WiFi<\/h2>\n<ol>\n<li><a href=\"http:\/\/eoghan.me.uk\/notes\/2016\/04\/09\/rpi-wifi-wpa-supplicant\/\">Set up WiFi<\/a> if you will be using it, and note the IP address (initially set up on a standard home network, but later I set it up for <a href=\"http:\/\/eoghan.me.uk\/notes\/2016\/04\/09\/rpi-wifi-wpa-supplicant#eduroam\">Edinburgh University&#8217;s eduroam<\/a>).<\/li>\n<li>If the Pi will be connecting to an external web host (as with the <a href=\"http:\/\/eoghan.me.uk\/notes\/2016\/03\/28\/photo-booth\/\">Photo booth<\/a>) make sure you set up <a href=\"http:\/\/eoghan.me.uk\/notes\/2016\/03\/28\/sftp-public-key-auth\/\">Public Key Authentication<\/a> so the python scripts can log in and upload to your web host.<\/li>\n<\/ol>\n<h2>Set up camera module<\/h2>\n<p>If you will be using the camera module:<\/p>\n<ol>\n<li>Activate the camera module:\n<ol>\n<li><a href=\"https:\/\/www.raspberrypi.org\/help\/camera-module-setup\/\">Plug in the camera module<\/a> (be careful of static damage).<\/li>\n<li>Open the config menu.<\/li>\n<li>Switch to the &#8216;Interfaces&#8217; tab.<\/li>\n<li>Set &#8216;Camera&#8217; to &#8216;Enabled&#8217;.<\/li>\n<li>Click &#8216;OK&#8217;.<\/li>\n<li>Agree to reboot.<\/li>\n<li>Test the camera, with the following Terminal command to save a short video clip in your ~\/Documents directory:\n<pre class=\"lang:sh decode:true \">raspivid -o ~\/Documents\/vid.h264\n<\/pre>\n<p>If you get error messages instead of an image on the screen, see &#8216;troubleshooting&#8217; below.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<h3>Troubleshooting the Camera Module<\/h3>\n<p>At one point the camera module stopped working, with the following error message:<\/p>\n<pre class=\"toolbar-overlay:false striped:false marking:false ranges:false nums:false nums-toggle:false show-plain-default:true lang:sh decode:true \">mmal: mmal_vc_component_enable: failed to enable component: ENOSPC\nmmal: camera component couldn't be enabled\nmmal: main: Failed to create camera component\nmmal: Failed to run camera app. Please check for firmware updates<\/pre>\n<p>I was sure I&#8217;d killed it with static &#8230; but after a bit of searching online, I found all that had happened was the small brown &#8216;SUNNY&#8217; connector on the front of the camera module had come loose. Seating that connector back in got the module working again.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are a huge number of tutorials on the Net, showing you how to set up your Raspberry Pi &#8211; but, briefly, the process I went through was: Basic set up Set up your Raspberry Pi OS, and boot the Raspberry Pi up. After booting up your Raspberry Pi with a freshly configured card, the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":258,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-175","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-raspberry-pi"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Set Up Raspberry Pi - Eoghan&#039;s Notes<\/title>\n<meta name=\"description\" content=\"There are a huge number of tutorials on the Net, showing you how to set up your Raspberry Pi - but, briefly, the process I went through was:\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/eoghan.me.uk\/notes\/2016\/04\/27\/setup-raspberry-pi\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Set Up Raspberry Pi - Eoghan&#039;s Notes\" \/>\n<meta property=\"og:description\" content=\"There are a huge number of tutorials on the Net, showing you how to set up your Raspberry Pi - but, briefly, the process I went through was:\" \/>\n<meta property=\"og:url\" content=\"https:\/\/eoghan.me.uk\/notes\/2016\/04\/27\/setup-raspberry-pi\/\" \/>\n<meta property=\"og:site_name\" content=\"Eoghan&#039;s Notes\" \/>\n<meta property=\"article:published_time\" content=\"2016-04-27T20:55:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-10-15T10:38:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/eoghan.me.uk\/notes\/files\/2016\/04\/raspberry_pi.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1038\" \/>\n\t<meta property=\"og:image:height\" content=\"576\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Eoghan\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Eoghan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/eoghan.me.uk\/notes\/2016\/04\/27\/setup-raspberry-pi\/\",\"url\":\"https:\/\/eoghan.me.uk\/notes\/2016\/04\/27\/setup-raspberry-pi\/\",\"name\":\"Set Up Raspberry Pi - Eoghan&#039;s Notes\",\"isPartOf\":{\"@id\":\"https:\/\/eoghan.me.uk\/notes\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/eoghan.me.uk\/notes\/2016\/04\/27\/setup-raspberry-pi\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/eoghan.me.uk\/notes\/2016\/04\/27\/setup-raspberry-pi\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/eoghan.me.uk\/notes\/files\/2016\/04\/raspberry_pi.jpg\",\"datePublished\":\"2016-04-27T20:55:37+00:00\",\"dateModified\":\"2021-10-15T10:38:31+00:00\",\"author\":{\"@id\":\"https:\/\/eoghan.me.uk\/notes\/#\/schema\/person\/8d580b9cc431078e942962f5df92e800\"},\"description\":\"There are a huge number of tutorials on the Net, showing you how to set up your Raspberry Pi - but, briefly, the process I went through was:\",\"breadcrumb\":{\"@id\":\"https:\/\/eoghan.me.uk\/notes\/2016\/04\/27\/setup-raspberry-pi\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/eoghan.me.uk\/notes\/2016\/04\/27\/setup-raspberry-pi\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/eoghan.me.uk\/notes\/2016\/04\/27\/setup-raspberry-pi\/#primaryimage\",\"url\":\"https:\/\/eoghan.me.uk\/notes\/files\/2016\/04\/raspberry_pi.jpg\",\"contentUrl\":\"https:\/\/eoghan.me.uk\/notes\/files\/2016\/04\/raspberry_pi.jpg\",\"width\":1038,\"height\":576},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/eoghan.me.uk\/notes\/2016\/04\/27\/setup-raspberry-pi\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/eoghan.me.uk\/notes\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Set Up Raspberry Pi\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/eoghan.me.uk\/notes\/#website\",\"url\":\"https:\/\/eoghan.me.uk\/notes\/\",\"name\":\"Eoghan&#039;s Notes\",\"description\":\"The odd note that might come in handy someday\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/eoghan.me.uk\/notes\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/eoghan.me.uk\/notes\/#\/schema\/person\/8d580b9cc431078e942962f5df92e800\",\"name\":\"Eoghan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/eoghan.me.uk\/notes\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/248edf410b45769042d524cee3cce559fa8db50415efb82f79ea8a2d138b15cf?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/248edf410b45769042d524cee3cce559fa8db50415efb82f79ea8a2d138b15cf?s=96&d=mm&r=g\",\"caption\":\"Eoghan\"},\"url\":\"https:\/\/eoghan.me.uk\/notes\/author\/eoghan\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Set Up Raspberry Pi - Eoghan&#039;s Notes","description":"There are a huge number of tutorials on the Net, showing you how to set up your Raspberry Pi - but, briefly, the process I went through was:","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/eoghan.me.uk\/notes\/2016\/04\/27\/setup-raspberry-pi\/","og_locale":"en_GB","og_type":"article","og_title":"Set Up Raspberry Pi - Eoghan&#039;s Notes","og_description":"There are a huge number of tutorials on the Net, showing you how to set up your Raspberry Pi - but, briefly, the process I went through was:","og_url":"https:\/\/eoghan.me.uk\/notes\/2016\/04\/27\/setup-raspberry-pi\/","og_site_name":"Eoghan&#039;s Notes","article_published_time":"2016-04-27T20:55:37+00:00","article_modified_time":"2021-10-15T10:38:31+00:00","og_image":[{"width":1038,"height":576,"url":"https:\/\/eoghan.me.uk\/notes\/files\/2016\/04\/raspberry_pi.jpg","type":"image\/jpeg"}],"author":"Eoghan","twitter_misc":{"Written by":"Eoghan","Estimated reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/eoghan.me.uk\/notes\/2016\/04\/27\/setup-raspberry-pi\/","url":"https:\/\/eoghan.me.uk\/notes\/2016\/04\/27\/setup-raspberry-pi\/","name":"Set Up Raspberry Pi - Eoghan&#039;s Notes","isPartOf":{"@id":"https:\/\/eoghan.me.uk\/notes\/#website"},"primaryImageOfPage":{"@id":"https:\/\/eoghan.me.uk\/notes\/2016\/04\/27\/setup-raspberry-pi\/#primaryimage"},"image":{"@id":"https:\/\/eoghan.me.uk\/notes\/2016\/04\/27\/setup-raspberry-pi\/#primaryimage"},"thumbnailUrl":"https:\/\/eoghan.me.uk\/notes\/files\/2016\/04\/raspberry_pi.jpg","datePublished":"2016-04-27T20:55:37+00:00","dateModified":"2021-10-15T10:38:31+00:00","author":{"@id":"https:\/\/eoghan.me.uk\/notes\/#\/schema\/person\/8d580b9cc431078e942962f5df92e800"},"description":"There are a huge number of tutorials on the Net, showing you how to set up your Raspberry Pi - but, briefly, the process I went through was:","breadcrumb":{"@id":"https:\/\/eoghan.me.uk\/notes\/2016\/04\/27\/setup-raspberry-pi\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/eoghan.me.uk\/notes\/2016\/04\/27\/setup-raspberry-pi\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/eoghan.me.uk\/notes\/2016\/04\/27\/setup-raspberry-pi\/#primaryimage","url":"https:\/\/eoghan.me.uk\/notes\/files\/2016\/04\/raspberry_pi.jpg","contentUrl":"https:\/\/eoghan.me.uk\/notes\/files\/2016\/04\/raspberry_pi.jpg","width":1038,"height":576},{"@type":"BreadcrumbList","@id":"https:\/\/eoghan.me.uk\/notes\/2016\/04\/27\/setup-raspberry-pi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/eoghan.me.uk\/notes\/"},{"@type":"ListItem","position":2,"name":"Set Up Raspberry Pi"}]},{"@type":"WebSite","@id":"https:\/\/eoghan.me.uk\/notes\/#website","url":"https:\/\/eoghan.me.uk\/notes\/","name":"Eoghan&#039;s Notes","description":"The odd note that might come in handy someday","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/eoghan.me.uk\/notes\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/eoghan.me.uk\/notes\/#\/schema\/person\/8d580b9cc431078e942962f5df92e800","name":"Eoghan","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/eoghan.me.uk\/notes\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/248edf410b45769042d524cee3cce559fa8db50415efb82f79ea8a2d138b15cf?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/248edf410b45769042d524cee3cce559fa8db50415efb82f79ea8a2d138b15cf?s=96&d=mm&r=g","caption":"Eoghan"},"url":"https:\/\/eoghan.me.uk\/notes\/author\/eoghan\/"}]}},"_links":{"self":[{"href":"https:\/\/eoghan.me.uk\/notes\/wp-json\/wp\/v2\/posts\/175","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eoghan.me.uk\/notes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eoghan.me.uk\/notes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eoghan.me.uk\/notes\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eoghan.me.uk\/notes\/wp-json\/wp\/v2\/comments?post=175"}],"version-history":[{"count":34,"href":"https:\/\/eoghan.me.uk\/notes\/wp-json\/wp\/v2\/posts\/175\/revisions"}],"predecessor-version":[{"id":488,"href":"https:\/\/eoghan.me.uk\/notes\/wp-json\/wp\/v2\/posts\/175\/revisions\/488"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/eoghan.me.uk\/notes\/wp-json\/wp\/v2\/media\/258"}],"wp:attachment":[{"href":"https:\/\/eoghan.me.uk\/notes\/wp-json\/wp\/v2\/media?parent=175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eoghan.me.uk\/notes\/wp-json\/wp\/v2\/categories?post=175"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eoghan.me.uk\/notes\/wp-json\/wp\/v2\/tags?post=175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}