Getting Started: Raspberry Pi

Getting Started: Raspberry Pi

by ACROBOTIC Industries


Time to complete: 5-10 mins; Level of Difficulty: Beginner

If you haven’t used a Raspberry Pi before, you migh be wondering what all the fuzz is about. Whereas we cannot cram everything this little device can do in a single tutorial, we can certainly highlight how easy it is to get it running. We’ll go over the few necessary components to get up and running, particularly choosing an Operating System and installing it onto the Pi’s ‘hard drive’!

The Raspberry Pi

The first questions everyone asks when hearing about the Raspberry Pi are:

What is it?

First and foremost the Raspberry Pi is a computer much like any desktop or laptop.  Just as any other computer in the market, the Raspberry Pi runs an Operating System that allows users to perform any common tasks such as browsing the internet, making spreadsheets and text documents, watching high-definition (up to 1080p!) video, and even playing videogames.

Raspberry Pi Desktop Computer

However, compared to other computers the Raspberry Pi features a tiny form factor and a remarkably low price tag.  This fantastic single-board computer was developed to enable people of all ages and technical backgrounds to explore computing and learn programming.  Whereas it was initially targeted at middle-and high-school students in the UK, it quickly became widely adopted around the world from all corners of the electronics market, from the hobbyist to the commercial and industrial.

What does it do?

As mentioned before, the Raspberry Pi is capable of carrying out typical computer tasks.  However, unlike others, this single-board computer has the ability to interact with the physical world.  That is, without the need of expensive equipment like Data Acquisition devices or Programmable Controllers, we can use a Raspberry Pi to communicate with external sensors, actuators, and other 'low-level' devices.  This unique feature enables users to build a wide range of projects, from music machines and fart detectors to weather stations and tweeting birdhouses!

Step-by-step Video

We've made a detailed video of the process described below, which guides you step by step through the process:

Getting Started

Before diving into all the fun things that can be done with the Raspberry Pi, we need to do a little prepping.  Depending on what package or bundle you purchased with your Raspberry Pi, you may or may not have received a pre-programmed SD Card.  The SD Card is the Hard Disk Drive (HDD) of the Raspberry Pi, and it holds the Operating System files that run when we apply power and boot up the system.

Raspberry Pi B+ and microSD Card

There's nothing special about the SD Card needed so any microSD (for current models A+, B+, 2, and 3) or standard SD Card (for the older A and B models) should work.  Over the next few steps we'll show you how to turn an SD Card into a Hard Disk Drive for the Raspberry Pi.  We recommended that you use a card with at least 8GB of capacity.

If you already have a microSD Card formatted with an Operating System, you can skip ahead to the step: Booting up your Raspberry Pi.  Otherwise, you'll need both the card and a standard desktop or laptop computer to complete the next few steps.

Choosing an Operating System

Different than most standard Mac or PCs, the Raspberry Pi offers a set of Operating Systems that allow us to dedicate this little device to a particular application.  The majority of the options are versions (distributions) of the GNU/Linux Operating System, and most of them are specifically tailored to a specific purpose such as running a Media Center (e.g., using OpenELEC) or a Music Generator (e.g., using Sonic Pi).  

For the purpose of this lesson, we'll be using the Raspbian distribution, however, you can always keep a bunch of Operating Systems on different microSD Cards, and interchange them when necessary!

If you haven't already, start downloading the Operating System image file for the Raspbian distribution, which we'll use later in the "Writing an OS Image File to the SD Card" step.  It is available at the Raspberry Pi Foundation's website:

Download the Raspbian GNU/Linux Distribution for Raspberry Pi

Formatting the microSD Card

Now, we need to prepare the microSD Card for writing an Operating System image file to it.  We'll run a quick format in order to erase its contents and also to choose an appropriate File System.

Note that you should use an microSD Card exclusively for your Raspberry Pi, thus choose either a spare or new one.  Also, double-check the contents of the card and back up any files you'd like to preserve.

Mac OS X

Load an SD Card onto a Computer

  • Open the Disk Utility application (hint: press Command+Space Bar to use Spotlight to search for the application).  
  • On the left side where all the disk devices are listed, select the microSD Card that you've connected.  In our case is the 7.89 GB APPLE SD Card... option, yours might be different.
  • Click the Erase tab next to the First Aid one.
  • Select MS-DOS (FAT) from the Format drop down options (if not selected by default).
  • Click the Erase button near the bottom right corner of the window.

Mac OSX Disk Utility Application

Writing an OS Image File to the SD Card

Now that we have downloaded the Raspbian image file and successfully formatted our microSD card, we are ready to write the image file onto it.

Mac OS X

We'll use a command-line interface on our Macs for this process.  The commands listed below can be copy-pasted onto your terminal directly.  Remeber to hit the enter/return key after entering the commands.

Open the Terminal application (hint: press Command+Space Bar to use Spotlight to search for the application), and enter the command:

diskutil list

This command lists all storage devices currently available in the system.  From the list we can identify the microSD Card inserted on the previous step.

Listing Disks on our Mac Computer

In our case, the microSD Card inserted in my computer has been listed as /dev/disk2. Depending on your system, the numbering might be different (e.g., /dev/disk3).  You can identify the correct one from the name assigned to the card and from its listed storage capacity (8GB in our case).

Next, we unmount the card, which dettaches its filesystem from the currently accessible filesystem of our computer.  Amongst other things, this stops any pending read/write operations to the card:

diskutil unmountdisk /dev/disk2

Unmounting SD Card on our Mac Computer

We then locate the Raspbian image file that we downloaded earlier  Typically, it should be inside the Downloads directory.  The download is usually a zipped file (.zip extension), which by using the Finder application, navigating to the Downloads directory (or wherever it's been downloaded), and double-clicking on it.  Take note of where the file lives in your system as the path will be needed for the next operation.  

The next command is highly dependant on a few things.  First, the path of the image file might change because a new version is released (so the file itself will be named differently) or because you downloaded the file to a different directory.  More importantly, remember that the system path of your microSD Card (/dev/diskNmight be different! 

To write the image file to our microSD card we use the disk dump utility.  It allows us to copy byte-for-byte the image file from our computer's filesystem to the filesystem on the microSD Card:

sudo dd if=~/Downloads/2015-02-16-raspbian-wheezy.img of=/dev/diskN bs=2m

This process, which is different than copying or drag-and-dropping the image file, will take a few minutes.  Notice that issuing the command without sudo will result in a Permission denied error, as writing image to disks requires by default superuser (root) privileges. Once it's finished, you will get a confirmation message as shown below.

Writing the Raspbian Image File to the microSD Card

After the writing is completed, we can eject the card from the computer and use it with our Raspberry Pi!  To eject the card we can use either using the shortcut icon in Finder or by right-clicking on the Desktop icon of the microSD Card.  Alternatively, we can enter the command:

sudo diskutil eject /dev/rdiskN

Remember to change rdiskN for your own setup as described earlier in this tutorial.

Booting up your Raspberry Pi

We’re now ready to start using our Raspberry Pi as a desktop computer!  Before moving forward, we'll need to gather the necessary peripherals (keyboard and mouse) and a video monitor that will be used with the Raspberry Pi.

We place the microSD Card in the metal socket found on the underside of the Raspberry Pi board.  The contacts of the microSD card should be facing downward (towards the board) and inward (towards the connector itself).  We also need to ensure that the card is securely in place by gently pushing down on it until hearing a ‘click’.

Insert the microSD Card into the Raspberry Pi

Before applying power, we need to connect the keyboard, mouse, USB Wi-Fi adapter (optional), and video monitor.  We can then connect the Raspberry Pi to a 5V USB Micro-B Power Supply.  After power is applied, text output from the boot-up process will be shown on the screen.  Towards the end of the boot-up process, the raspi-config screen will come up (shown below).  This allows us to configure important options for the operation of the Raspberry Pi:

Raspi-config configuration options for the Raspberry Pi

You can explore all the different options, but 3 that we typically recomend you go over are:

  • 1 Expand Filesystem: this allows the Operating System to access a bigger storage space of the memory card.
  • 3 Enable Boot to Desktop/Scratch: by default Raspbian boots to a terminal where we can start a Desktop Environment by issuing the command startx.  If you rather boot directly to the Desktop Environment, use this option.
  • 4 Internationalisation Options: by default the keyboard option for the Raspberry Pi is set to a British layout.  Use this option to change it (if needed).  You can also select the preferred Time Zone for the system clock.

After making these changes you'll need to reboot the system; note that a few of the options might ask you to do it during the configuration process.  If you've selected to boot onto the Desktop Environment, the next time your Raspberry Pi boots up you should somthing similar to the image below at the end of the boot-up process:

Raspbian Desktop Environment

Otherwise, you'll see a login console login screen.  In such case there'll be a text prompt asking for a username.   The default username for the Raspbian image is pi whereas the default password is raspberry.  After successfully login in, you can always start the Desktop Environment by running the command:



Mac OS X
  • Writing to the microSD Card takes too long!

When writing the Raspbian image file to the microSD card you may notice that the process takes more than just a few minutes. If the diskdump (dd) command takes longer than 15 minutes, you can stop it by hitting Control+C on your keyboard.  Try re-formatting the SD Card (remember to select FAT as the format) and writing the image file once again.

  • Getting a "Disk is busy" error when attempting to write the image file

Writing to the filesystem of your own computer will have catastrophic results, so please make sure that you're attempting to write to the correct filesystem!  That is, that you're choosing the correct device for the output file (of=) parameter.  

Typically on OS X rdisk0 is the main Hard Disk Drive of your computer, and sometimes even rdisk1 will also correspond to an internal drive.  If you're unsure, you can always list the devices (using diskutil list) before and after connecting the microSD Card to the computer's port.  The microSD Card will not be listed in the first attempt, but it will be shown on the second one so you'll know for sure under what rdisk it's listed.

  • Getting a "File not found" error when attempting to write the image file

This occurs when the wrong path to the image file is entered.  Here are a few things to try:

  1. Please ensure that the file has finished downloading to the expected directory (in our case, we used the Downloads directory located inside the User's Home directory).  
  2. Use Finder to navigate to said directory, and ensure that the name of the file matches the one being used in the command.  
  3. At the time of this writing the file name is 2015-02-16-raspbian-wheezy.img which is bound to change for the next version of Raspbian.
  • Getting a "Permission Denied" error when attempting to write the image file

This error typically occurs if we haven't included sudo at the beginning of the command, or we have mistyped our password.  Note that nothing will be 'echoed' on screen while we type the password, nonetheless when we hit enter/return after entering it (if the entry is valid) the command will execute correctly.

Leave a comment

  • Please note, comments must be approved before they are published

$1 Days
$2 Hours
$3 Minutes
$4 Second
{ "en":{ "general": { "field": { "required": "Required", "actions": "Actions", "top_btn": "Top" }, "accessibility": { "skip_to_content": "Skip to content", "close_modal": "Close (esc)" }, "meta": { "tags": "Tagged \"[[ tags ]]\"", "page": "Page [[ page ]]" }, "404": { "title": "404 Page Not Found", "subtext": "The page you requested does not exist.", "link": "Continue shopping" }, "pagination": { "previous": "Previous", "next": "Next", "current_page": "Page [[ current ]] of [[ total ]]" }, "password_page": { "opening_soon": "Opening Soon", "login_form_heading": "Enter store using password", "login_form_password_label": "Password", "login_form_password_placeholder": "Your password", "login_form_submit": "Enter", "signup_form_email_label": "Email", "signup_form_success": "We will send you an email right before we open!", "admin_link_html": "Are you the store owner? Log in here<\/a>", "password_link": "Enter using password", "powered_by_shopify_html": "This shop will be powered by [[ shopify ]]" }, "social": { "share_on_facebook": "Share", "share_on_twitter": "Tweet", "share_on_pinterest": "Pin it", "alt_text": { "share_on_facebook": "Share on Facebook", "share_on_twitter": "Tweet on Twitter", "share_on_pinterest": "Pin on Pinterest" } }, "search": { "no_results_html": "Your search for \"[[ terms ]]\" did not yield any results.", "results_with_count": { "one": "[[ count ]] result for \"[[ terms ]]\"", "other": "[[ count ]] results for \"[[ terms ]]\"" }, "title": "Search our site", "placeholder": "Search", "submit": "Submit", "close": "Close search" }, "newsletter_form": { "newsletter_email": "Join our mailing list", "email_placeholder": "Email address", "confirmation": "Thanks for subscribing", "submit": "Subscribe", "show_me_text": "Do not show me again" }, "filters": { "show_more": "Show More", "show_less": "Show Less" }, "breadcrumbs": { "home": "Home", "create_account": "Create account", "account": "Account", "addresses": "Addresses" }, "item": { "remove": "Remove Item" } }, "sections": { "header": { "top_header_login": "Login", "top_header_register": "Register", "top_header_wishlist": "Wish list", "register_dropdown": "No account? Create one here", "forgot": "Forgot password", "all_collection": "All Collections", "world_wide_delivery": "Worldwide delivery", "shipping_text": "Free UK Delivery on orders over £ 100", "hot_line": "Hot line" }, "menu": { "mobile_menu_tab": "Menu", "mobile_account_tab": "Account", "mobile_settings_tab": "Settings" }, "slideshow": { "next_slide": "Next slide", "previous_slide": "Previous slide", "pause_slideshow": "Pause slideshow", "play_slideshow": "Play slideshow", "play_video": "Play video", "close_video": "Close video" }, "map": { "get_directions": "Get directions", "address_error": "Error looking up that address", "address_no_results": "No results for that address", "address_query_limit_html": "You have exceeded the Google API usage limit. Consider upgrading to a Premium Plan<\/a>.", "auth_error_html": "There was a problem authenticating your Google Maps account. Create and enable the JavaScript API<\/a> and Geocoding API<\/a> permissions of your app." } }, "blogs": { "article": { "view_all": "View all", "all_topics": "All topics", "by_author": "by [[ author ]]", "posted_in": "Posted in", "read_more": "Read more", "back_to_blog": "Back to [[ title ]]" }, "comments": { "title": "Leave a comment", "name": "Name", "email": "Email", "message": "Message", "post": "Post comment", "moderated": "Please note, comments must be approved before they are published", "success_moderated": "Your comment was posted successfully. We will publish it in a little while, as our blog is moderated.", "success": "Your comment was posted successfully! Thank you!", "comments_with_count": { "one": "[[ count ]] comment", "other": "[[ count ]] comments" } } }, "cart": { "general": { "title": "Your cart", "note": "Add a note to your order", "remove": "Remove", "subtotal": "Subtotal", "savings": "You're saving", "shipping_at_checkout": "Shipping & taxes calculated at checkout", "update": "Update", "checkout": "Process Check out", "empty": "Your cart is currently empty.", "cookies_required": "Enable cookies to use the shopping cart", "edit": "Edit", "cancel": "Cancel", "continue_shopping": "Continue shopping", "recently_added_item": "Recently added item(s)", "remove_item": "Remove This Item", "view_and_edit_cart": "View and edit cart", "clear": "Clear cart", "empty_page_title": "Shopping Cart is Empty", "here": "here", "empty_continue_html": "Click here to continue shopping.", "processing": "Processing...", "items_count_label" : "[[ count ]] item(s) in your cart", "ok" : "Ok" }, "label": { "product": "Product", "price": "Price", "quantity": "Quantity", "total": "Total", "total_item": "Total item", "sub_total_top": "Cart Subtotal" } }, "collections": { "general": { "view_all": "View all", "clear_all": "Clear All", "no_matches": "Sorry, there are no products in this collection", "items_with_count": { "one": "[[ count ]] product", "other": "[[ count ]] products" }, "load_more": "Load More", "sidebar_btn": "Filter by" }, "sorting": { "title": "Sort by", "manual": "Featured", "best_selling": "Best Selling", "title_ascending": "Alphabetically, A-Z", "title_descending": "Alphabetically, Z-A", "price_ascending": "Price, low to high", "price_descending": "Price, high to low", "created_descending": "Date, new to old", "created_ascending": "Date, old to new" }, "filters": { "title_tags": "Filter", "all_tags": "All products", "categories": "categories", "title": "Filter", "color": "Color", "size": "Size", "brand": "Brand", "price": "Price", "green": "Green", "blue": "Blue", "red": "Red", "pink": "Pink", "black": "Black", "purple": "Purple", "white": "White", "orange": "Orange" }, "product_item": { "quick_shop": "Quick View", "compare": "Compare", "wishlist": "Add to Wishlist" } }, "contact": { "form": { "name": "Name", "email": "Email", "phone": "Phone Number", "message": "Message", "submit": "Submit", "post_success": "Thanks for contacting us. We'll get back to you as soon as possible.", "address": "Address", "telephone": "Telephone", "title": "Write us", "required": "Required" } }, "customer": { "account": { "title": "My Account", "details": "Account Details", "view_addresses": "View Addresses", "return": "Return to Account Details" }, "activate_account": { "title": "Activate Account", "subtext": "Create your password to activate your account.", "password": "Password", "password_confirm": "Confirm Password", "submit": "Activate Account", "cancel": "Decline Invitation" }, "addresses": { "title": "Your Addresses", "default": "Default", "add_new": "Add a New Address", "edit_address": "Edit address", "first_name": "First Name", "last_name": "Last Name", "company": "Company", "address1": "Address1", "address2": "Address2", "city": "City", "country": "Country", "province": "Province", "zip": "Postal\/Zip Code", "phone": "Phone", "set_default": "Set as default address", "add": "Add Address", "update": "Update Address", "cancel": "Cancel", "edit": "Edit", "delete": "Delete", "delete_confirm": "Are you sure you wish to delete this address?" }, "login": { "title": "Login", "desc": "If you have an account, sign in with your email address.", "email": "Email", "password": "Password", "forgot_password": "Forgot your password?", "sign_in": "Sign In", "guest_title": "Continue as a guest", "guest_continue": "Continue" }, "orders": { "title": "Order History", "order_number": "Order", "date": "Date", "payment_status": "Payment Status", "fulfillment_status": "Fulfillment Status", "total": "Total", "none": "You haven't placed any orders yet." }, "order": { "title": "Order [[ name ]]", "date": "Placed on [[ date ]]", "cancelled": "Order Cancelled on [[ date ]]", "cancelled_reason": "Reason: [[ reason ]]", "billing_address": "Billing Address", "payment_status": "Payment Status", "shipping_address": "Shipping Address", "fulfillment_status": "Fulfillment Status", "discount": "Discount", "shipping": "Shipping", "tax": "Tax", "product": "Product", "sku": "SKU", "price": "Price", "quantity": "Quantity", "total": "Total", "fulfilled_at": "Fulfilled [[ date ]]", "subtotal": "Subtotal" }, "recover_password": { "title": "Reset your password", "email": "Email", "submit": "Submit", "cancel": "Cancel", "subtext": "We will send you an email to reset your password.", "success": "We've sent you an email with a link to update your password." }, "reset_password": { "title": "Reset account password", "subtext": "Enter a new password for [[ email ]]", "password": "Password", "password_confirm": "Confirm Password", "submit": "Reset Password" }, "register": { "title": "Create Account", "first_name": "First Name", "last_name": "Last Name", "email": "Email", "password": "Password", "submit": "Create", "desc": "Creating an account is easy. Just fill in the form below." } }, "homepage": { "onboarding": { "product_title": "Your product's name", "product_description": "This area is used to describe your product’s details. Tell customers about the look, feel, and style of your product. Add details on color, materials used, sizing, and where it was made.", "collection_title": "Your collection's name", "blog_title": "Your post's title", "blog_excerpt": "Your store hasn’t published any blog posts yet. A blog can be used to talk about new product launches, tips, or other news you want to share with your customers. You can check out Shopify’s ecommerce blog for inspiration and advice for your own store and blog.", "blog_author": "Author name", "no_content": "This section doesn’t currently include any content. Add content to this section using the sidebar." } }, "layout": { "navigation": { "search": "Search", "toggle": "expand\/collapse", "expand": "expand", "collapse": "collapse", "all_categories": "All Categories" }, "cart": { "title": "Cart", "items_count": { "one": "item", "other": "items" } }, "customer": { "account": "Account", "log_out": "Log out", "logout": "Log out", "log_in": "Log in", "create_account": "Create account", "sign_up": "Sign up", "wishlist": "Wishlist" }, "footer": { "social_platform": "[[ name ]] on [[ platform ]]" }, "list_page": { "grid": "Grid", "list": "List" } }, "products": { "product": { "regular_price": "Regular price", "sold_out": "Sold out", "unavailable": "Unavailable", "on_sale": "Sale", "quantity": "Quantity", "add_to_cart": "Add to cart", "back_to_collection": "Back to [[ title ]]", "related_title": "Related Products", "qty_increase": "Increase", "qty_decrease": "Decrease", "deal_days": "Days", "deal_hours": "Hours", "deal_minutes": "Minutes", "deal_second": "Second", "select_option": "Select Option", "add_to_wishlist": "Add to Wishlist", "add_to_review": "Add to review", "compare_success_msg": "[[ product_title ]] has added to comparing box successful", "compare_exist_msg": "[[ product_title ]] is exist in comparing box", "compare_cart_msg": "[[ product_title ]] has added to shopping cart", "compare_remove_msg": "[[ product_title ]] has removed from comparing box", "compare_remove_msg": "[[ product_title ]] has removed from comparing box", "comparing_box": "Comparing box", "compare_no_items": "There is no items in comparing box", "wishlist_success_msg": "[[ product_title ]] has added to wishlist successful", "wishlist_exist_msg": "[[ product_title ]] is exist in wishlist", "wishlist_cart_msg": "[[ product_title ]] has added to shopping cart", "wishlist_box": "Wishlist", "wishlist_remove_msg": "[[ product_title ]] has removed from wishlist", "wislist_no_items": "There is no items in wishlist", "upsell_cart_msg": "\"[[ product_title ]]\" has added to shopping cart", "upsell_block_title": "Frequently bought with \"[[ product_title ]]\"", "upsell_cart_qty": "[[ count ]] item(s)", "upsell_product_page_title": "You may also like these products", "upsell_checkout_btn": "Checkout", "share": "Share product", "share_on_facebook": "Share on Facebook", "share_on_twitter": "Share on Twitter", "share_on_pinterest": "Share on Pinterest", "share_on_google": "Share on Google+", "share_on_linkedin": "Share on LinkedIn", "availability": "Availability", "in_stock": "In Stock", "out_of_stock": "Out of stock", "quick_overview": "Quick Overview", "details": "Details", "reviews": "Reviews", "first_review": "Be the first review", "tags": "Product Tags", "size_chart": "Size Chart", "options": "Options", "vendor": "Vendor", "features": "Features", "sale_left_text": "[[ sales ]] SOLD. HURRY! ONLY A FEW LEFT!", "checkout_text": "Secured and trusted checkout with" }, "upsell": { "recommend_text": "Someone purchased a", "minute_ago": "minutes ago" } }, "gift_cards": { "issued": { "title_html": "Here's your [[ value ]] gift card for [[ shop ]]!", "subtext": "Your gift card", "disabled": "Disabled", "expired": "Expired on [[ expiry ]]", "active": "Expires on [[ expiry ]]", "redeem_html": "Use this code at checkout to redeem your [[ value ]] gift card", "shop_link": "Start shopping", "print": "Print this gift card", "remaining_html": "[[ balance ]] left", "add_to_apple_wallet": "Add to Apple Wallet" } }, "date_formats": { "month_day_year": "%B %d, %Y" } } }