Raspberry Pi Hardware ListYou need the items in one of: Raspberry Pi 3 or Raspberry Pi 4. You need the items in Common Accessories. (1) Raspberry Pi 3This is the cheaper option and will work fine for this class any many other projects. Raspberry Pi 3 Computer ($34.30) Raspberry Pi 3 USB Power Cable with Switch ($5.99) (2) Raspberry Pi 4This is the more expensive option, but it is the latest version of the Raspberry Pi. It is faster and comes in larger memory sizes. Raspberry Pi 4 Computer (most basic kit I could find) ($55.99) Raspberry Pi 4 USB Power Cable with Switch ($6.99) Common AccessoriesUSB TTL Serial Cable ($6.99) USB Ethernet Hub ($13.99) Ethernet Cable ($4.09) Micro SD Card 8 GB or more - 16 GB ($5.79) Optional AccessoriesA case is optional but recommended. Official Raspberry Pi Case (Raspberry Pi 3) ($7.81) Note if you use the USB TTY Serial Cable you want case that allow you to access the GPIO pins to connect the cable. Some cases do not allow you to do this. SD Card Reader/Writer USB 3.0 ($7.26) Operating System and Software InstallationOverviewWe are going to install Raspbian Buster Lite onto a Micro SD card then we are going to perform some basic configuration. Our main goal is to get your OS configured to connect your RPi to your laptop and to the Internet. Hardware Setup: Connect CablesYou should have 3 cables: USB TTL Serial cable, USB Power cable with Switch, and an Ethernet cable. You may also have a USB and Ethernet Hub. To connect the USB TTL Serial Cable see the picture below. Make sure you have the right color wires connected to the correct GPIO pins: You also need to connect your USB power cable with switch and the Ethernet cable. You should have everything connect to your laptop (perhaps all through the USB Hub with Ethernet port or all directly to your computer). Laptop/Computer Serial Driver SetupYou will need to do a little bit of software setup on your laptop so that we can access the RPi through the USB Serial cable. macOSFor macOS you need to install serial communication drivers for the USB TTL cable: Note the driver is in a ZIP file. You should unzip the file, inside is a .pkg file. You should double click on the .pkg file. You will be prompted to install the driver. During installation you will be asked to allow the Prolific serial driver extension to be installed from System Preferences then Security and Privacy. Select to allow the Prolific driver. After you install the drivers you will be asked to reboot your computer. If you skipped over the step in which it asks you to allow the driver access you need to go to System Preferences then Security & Privacy. In the General tab you need to approve the new Prolific driver so that it can be used. LinuxYou do not need to install serial drivers on Linux. Linux comes with driver support for the USB TTL cable. WindowsYou may not need USB TTL Serial drivers for Windows, but if you do, install the following: Raspbian Buster LiteThis semester we will be using Raspbian Buster Lite. If you want to run a full GUI Desktop on your Raspberry Pi, then you can install Raspbian Buster with Desktop. The Desktop image for the SD Card is bigger and will take longer to download and install compared to Raspbian Buster Lite. That said, the Desktop version should work fine for our work. You can find Raspbian Buster here: Download the ZIP version. Once you have the image you will need to copy the image file to the SD Card. You will need a tool to do this. A very fast and easy to use tool is called BalenaEtcher: There are versions of BalenaEtcher for macOS, Windows, and Linux. Download the version that matches the OS on your computer. Once you have imaged the SD card, you will need to edit the config.txt file on the boot partition. You will need mount your SD card onto your computer. It should show up as a volume called "boot." Use an editor to add the following line to the config.txt file in the top level directory of the boot volume: Make sure you have a newline (CR) at the end of this line. Laptop/Computer Terminal SetupYou will need a program that allows you to connect to the Raspbian serial console via the USB TTL cable. On macOS and Linux I recommend you use a program called kermit. On macOS, you can install kermit via Homebrew: Follow the homebrew install instructions. Once installed you can type: $ brew install c-kermit On Ubuntu Linux you can use apt-get to install c-kermit: $ sudo apt-get install ckermit Once installed, create a .kermrc file in your home directory (on your host computer/laptop): $ cd $ cat > .kermrc set line /dev/cu.usbserial set speed 115200 set carrier-watch off connect ^D $ (When you see ^D, type the CTRL key and D at the same time, do not type the characters "^D".) Note on Linux you will use a different device name for the set line. It is often something like /dev/ttyS0. Now you can use kermit to connect to your RPi via the USB Serial cable. Type: $ kermit Now turn on your RPi. You should see the boot squence. To exit kermit, type CTRL-\ then q You can start and stop kermit multiple times with out the terminal hanging. On Windows you can use the Putty Program: Also see more information for using Windows and Putty to connect to the serial console on a Raspberry Pi:
|