Raspberry Pi Primer

Raspberry Pi is a full-blown Linux computer for tinkerers. It can do many awesome things and it can be used in many interesting ways. Far too many to even begin listing them here.

If you are new to Raspberry Pi, you have a lot of exciting learning to do before you can take full advantage of Pis integration with Marty. This page is designed to serve as a jumping-off point for your research. The world of Raspberry Pi is a large and quickly improving landscape, so the best we can do is to introduce a few high level concepts to give you an idea of what you are looking for. Google and raspberrypi.org will be your best friends. Other links to bookmark include raspberrypi.org/documentation and projects.raspberrypi.org.

There is no need to follow everything on this page. Only use it if you don't know where to begin or if you are stuck. Once you find a link to a resource that suits you, you don't need to read further.

Setting up a Raspberry Pi

The first step is to get an SD card with an OS (Operating System) for the Pi to boot into. If you bought a pre-configured SD card, just insert it into the Pi and you should be ready to go.

The process of creating your own bootable SD card has been simplified dramatically over the past few years. As of April 2021, the best way is to use the Raspberry Pi Imager. Have a look around raspberrypi.org (or here), to see if there is an even better way and to learn more about SD card configuration and why it is necessary.

Before completing Raspberry Pi OS setup!

Headless mode

We suggest preparing your Pi for “headless mode” (this is a way to interact with the Pi without a direct connection to a monitor, mouse or keyboard), when using Marty. To do this, you need to pre-configure WiFi access and enable SSH, which together lets you log on to your Pi through another device. As of April 2021, the process (step 2.5 in this instructional video) is as follows:

   
- Press CTRL+SHIFT+X;  
- Check “Enable SSH” and choose a password (or configure an SSH key for better security, if you know how);   
- Check “Configure wifi” and fill in the credentials.

Interacting with a Raspberry Pi

There are many additional ways to connect to and interact with your Pi. Ask Google and you will receive several options. Three of the most common ways to interact with a Raspberry Pi include:

  1. Connecting a mouse, keyboard and a monitor to your Pi like it was a desktop computer;
  2. SSH (Secure Shell) - only gives you access to the terminal but works over the network so you don't need any extra hardware (i.e. it works in the previously mentioned headless mode);
  3. VNC (Virtual Network Computing) - works over the network like SSH but gives you visual access to Pi's desktop; it is another method of connecting to a Pi in headless mode.

You can find many more connection methods in the Raspberry Pi Documentation.

Pi with a mouse, keyboard and a monitor

Connecting all this to your Pi turns it into a desktop PC. This is the default mode of interacting with your Pi and can be used to set up SSH and VNC. If you have the necessary hardware, this approach is great for getting started with Raspberry Pi for the first time. However, it is not suitable for using the Pi with Marty (mainly because of all the cables required).

The visuals of the Raspberry Pi OS are not too dissimilar to those of a Windows or Mac computer. The visual interface gives you access to some useful programs but, as with most Linux systems, you will want to learn [how to use the Terminal](https://www.raspberrypi.org/documentation/usage/terminal/README.md) as it is necessary for all but the most basic tasks.

SSH (Secure Shell)

SSH gives you access to your Pi's Terminal over the network (WiFi or Ethernet). If you have done the headless configuration when creating the SD card, SSH should work out of the box. Otherwise, you will need to use a mouse, keyboard and a monitor to enable SSH and connect to WiFi (unless you are using a wired network).

The Raspberry Pi SSH Documentation (also linked above) should also have some pointers on how to set up the device you want to connect to the Pi from. (If not, Google) has you covered.)

VS Code Remote extension

If you have SSH set up on your Pi and Visual Studio Code installed on your normal computer, have a look at the Remote - SSH extension. It gives you easy access to the files on your Pi (so you can view and edit your code) and, at the same time, it gives you access to the Pi's Terminal so you can tell the Pi to execute your programs and you can view their textual output.

VNC (Virtual Network Computing)

In some sense, this is the best of both worlds, giving you the nice visual Desktop without requiring any extra peripherals or cables. One downside is that it is not enabled out of the box so you will need to set it up using either SSH or a mouse, keyboard and a monitor.

Next steps

Have a look at some of the awesome projects in the Raspberry Pi ecosystem. Once you feel like you got the hang of it, try connecting your Pi to your Marty and see if you can incorporate Marty into one of the projects.

Task Runner