the correct connector. Many cellphone chargers don’t provide
enough current, so check the rating marked on the back. An
underpowered Pi may still seem to work but will be flaky and
may fail unpredictably. Newer versions of the Pi will also blink
an error message on the desktop — “Under voltage detected!”
If in doubt, use the official Raspberry Pi power supply, which is
available at most places where Raspberry Pis are sold.
There are also several battery-pack solutions for taking
your Raspberry Pi on the go; the same rules about volt-
age and current apply there as well.
With the current version of the board, it is possible to power
the Pi from a USB hub that feeds power back into one of the
two external USB ports. However, there isn’t much protection
circuitry, so it may not be the best idea to power it over the
external USB ports. This is especially true if you’re going to
be doing electronics prototyping where you may accidentally
create short circuits that may draw a lot of current.
A microSD card
You’ll need at least 8GB, and it should be a Class 10 card for the
best read and write performance. There are operating systems
that fit onto SD cards with less than 8GB, but the standard Rasp-
berry Pi OS installation requires at least an 8GB microSD card.
USB keyboard and mouse
They’ll be helpful for controlling your computer. These peripher-
als are fairly generic, so no need to use anything fancy.
HDMI cable(s)
If you’re connecting to a monitor, you’ll need this or an appropri-
ate adapter for a DVI monitor. If you’re using the Pi 4, you’ll need
either an HDMI/HDMI microcable or the appropriate adapter.
You can also run the Pi headless, as described later in this chap-
ter. HDMI cables can vary wildly in price. If you’re just running
a cable three to six feet to a monitor, there’s no need to spend
more than $3 on an HDMI cable. If you are running long lengths
Getting Up and Running 9
GSW_RASPI_4ED_FIN.indd 9GSW_RASPI_4ED_FIN.indd 9 10/28/21 10:53 AM10/28/21 10:53 AM