Assignment 1: Get started with the Raspberry Pi
For this assignment, you will set up the Raspberry Pi 5 hardware, download the operating software, and get the Pi running.
Background
The Raspberry Pi 5 is an example of a single-board computer (SBC), which means that all its functionality is integrated onto one small circuit board. This device can perform the same tasks as a regular desktop or laptop computer, with performance roughly on par with a budget laptop. However, it is also capable of interfacing with sensors, controllers, and other miscellaneous electronic components through its general purpose input-output (GPIO) pins. For this reason, Raspberry Pi and other SBC devices are used in a wide variety of projects, including robots, industrial controls, 3D printing applications, security devices, home assistants, and arcade games, to name only a few.
To get some ideas of the types of tasks that can be performed by this SBC, take a look at the following resources:
While the Raspberry Pi is still a popular choice of SBC, it is by far not the only choice. An incomplete list of alternatives would include:
While we will be using the Raspberry Pi 5 for this course, many of the same concepts apply to these other SBC models. It should also be noted that there are multiple different models of Raspberry Pi available, with varying levels of performance, different hardware interfaces, different sizes, and different price points. The Raspberry Pi 5 is the latest “flagship” version of the device as of Fall 2024.
Software
Generally speaking, SBCs like the Raspberry Pi are delivered without an operating environment or other software. It is up to the user to acquire and install whatever software is needed for a given project.
In the case of the Raspberry Pi 5, the most popular software stacks are based on Linux. However, there is a version of Windows for Arm CPUs, and both FreeBSD and OpenBSD can be run on at least some Pi models. In this course, we will be using Linux, which will run from a MicroSD card plugged directly into the Pi. The software will be installed onto the MicroSD card using your laptop (or desktop) computer with a USB MicroSD adapter.
Procedure
- First, read the Getting started document in the official Raspberry Pi documentation. You can also find some tutorials on sites like YouTube, although the quality might vary. Be sure to note which model of the Pi is being discussed, as the instructions differ a bit between models.
- Begin by unboxing the Pi board and its accessories. If there is a protective cover over the fan header, remove it (a pair of needlenose pliers might be needed - you can find some on the wall in PENN 241).
- If you’re using the official Raspberry Pi case, remove its fan along with the plastic insert holding the fan. We will be using the Active Cooler instead.
- Attach the Active Cooler (there are YouTube videos illustrating this procedure).
- Install the Pi 5 with attached cooler into the case.
- Before closing the case, plug in the RTC clock battery. Use the sticky pad to secure the battery somewhere inside the case.
- Connect the power adapter, keyboard, mouse, and HDMI cable (via the Micro-HDMI adapter) to the Pi, but don’t plug the power adapter into the wall just yet. Connect the other end of the HDMI cable to a monitor or TV.
- Go to Raspberry Pi OS and download the Raspberry Pi Imager.
- Use the Raspberry Pi Imager to install the “Raspberry Pi OS with desktop” option onto a MicroSD card. At the OS Customization screen, set the hostname to your CCU username followed by -csci311. For example, my hostname would be mmurphy2-csci311. Set your username to your CCU username (the part of your CCU email address before the ‘@’ sign). Don’t configure wireless LAN if you’re on campus (extra steps are needed), but you may set it up with your home wireless or phone hotspot. Configure the time zone and US keyboard layout.
- Once your MicroSD card has been created, move the card from your laptop to the Raspberry Pi. Plug in the power adapter and turn on your monitor or TV. The Pi should boot automatically.
IMPORTANT: Do NOT get the “with desktop and recommended software” version of the software! This version includes a copy of Mathematica that has a license agreement containing an indemnification clause. We cannot agree to this license on a device owned by a South Carolina state agency. (You may disregard if you’ve purchased your own Pi and agree to the license, but we aren’t using Mathematica in this course, so you don’t need it.)
Submission Checklist
Once your Raspberry Pi has booted, open a terminal window. The prompt should show your CCU username. Run the following command:
date
If the date and time are incorrect, set the date and time manually. To do this, run the following command, changing the date and time in this example to the correct date and 24-hour (military) time:
sudo date 2024-08-21 15:30
Enter the password you set for your user account when prompted.
Once the date has been set, re-run the date
command to confirm.
Use your cell phone to take a screenshot that shows the following:
- Your entire Raspberry Pi setup, showing the assembled Pi.
- Your screen, which includes the open terminal window showing your username along with the correct date and time.
Upload the screenshot to Moodle as the submission for this assignment.
ABET Assessment
Successful completion of this assignment satisfies the following performance indicator:
- 1.2. Analyze a complex problem by breaking it down into smaller components.