Adafruit Raspberry Pi Quick-Start

Raspberry Pi Computer Quick-Start
Created by lady ada
Last updated on 2020-10-17 01:14:22 AM EDT
Raspberry Pi Quick Setup
This quick-start guide will get you ready to connect and run all sorts of Adafruit projects on your Raspberry Pi computer
You will need:
with Ethernet and WiFi built in
Matching power supply (USB C type for Pi 4 and later (https://adafru.it/FQQ), or Micro USB type for Pi 3 B+, Pi
Zeros (https://adafru.it/e5A) or earlier)
8 GB or larger micro SD card (https://adafru.it/JA0) and USB reader/writer
SD Card Prep
First we need to perform the basic set up the Raspberry Pi. These are the first steps:
download the latest Raspbian desktop operating system
burn the OS to an SD card
enable SSH
add WiFi settings and credentials
For details on doing these things, follow the first four pages of this guide (https://adafru.it/DQA) to get your Pi setup with Raspbian Lite (for 'headless' or remote operation) or NooBs (for graphical / desktop use), WiFi, and ssh enabled.
Once the SD card is prepared, come back here so we can continue.
Power to the Pi
Safely eject the SD card from your main computer. Then, with the Pi unplugged from power, insert the SD card into the
© Adafruit Industries https://learn.adafruit.com/raspberry-pi-computer-quick-start Page 3 of 9
Pi's SD card slot.
Then, plug in the power to the Pi. You should see some LEDs light up.
From here forward, we'll be connecting to the Pi remotely from our main computer. Make sure your computer is on the
same WiFi network as the Pi.
Ping
After a minute or two, you can try and ping the Pi to see if it has connected to your network. Open a terminal on your
computer, such as Terminal.app on a mac (Windows users will require some additional setup. Read
here (https://adafru.it/q1e)), and type this and press return:
ping -c 3 raspberrypi.local
You should see an output similar to this:
jep@machine ~ % ping -c 3 raspberrypi.local PING raspberrypi.local (192.168.1.68): 56 data bytes 64 bytes from 192.168.1.68: icmp_seq=0 ttl=64 time=14.993 ms 64 bytes from 192.168.1.68: icmp_seq=1 ttl=64 time=20.565 ms 64 bytes from 192.168.1.68: icmp_seq=2 ttl=64 time=50.571 ms
--- raspberrypi.local ping statistics --­3 packets transmitted, 3 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 14.993/28.710/50.571/15.625 ms
This tells us that the Pi is on the network, and has an address of 192.168.1.68.
SSH
We can now connect to it through the secure shell (SSH) so we can control it remotely.
Here's some great info on SSH (https://adafru.it/vbC) from the Raspberry Pi Foundation.
Type the following in your terminal:
ssh pi@raspberrypi.local
or
ssh pi@192.168.1.68 (or whatever address you saw returned earlier when you pinged it.)
You may see a message warning you that the authenticity of the host can't be established, Are you sure you want to continue connecting (yes/no)?
To this question you can reply by typing yes and pressing return. This will add the Pi to your list of known hosts and
should not pop up again with this question.
You will now see the password prompt for the Pi:
pi@raspberrypi.local's password:
Go ahead and type in the default password, which is: raspberry
© Adafruit Industries https://learn.adafruit.com/raspberry-pi-computer-quick-start Page 4 of 9
Change the Password!
You will now be logged into the Pi over ssh! There will be a warning about changing your password from the default
and instructions on how to do so. Do it now! Type passwd , hit return and follow the instructions to create a new,
secure, non-default password!
Rename the Pi
You may end up with multiple Pi computers on your network, which can get confusing if they are all named raspberrypi. To rename this one for this project, type in sudo raspi-config and press return.
Use the arrows and enter key on your keyboard to
navigate. Pick 2 Network Options and press return on
your keyboard.
Then, pick N1 Hostname.
Enter a new hostname -- I typed
raspberrypiBlinkaBridge
Use the Tab key to get to the <Ok> button and press
return.
Press tab twice to get to the <Finish> button and press
return.
Now, we'll restart the Pi to make the changed host name
show up on the network by typing sudo reboot and
pressing return.
Note, this will close the SSH session. After the Pi
restarts, wait about a minute, and then reconnect over
SSH. This time, you'll use the new name: ssh
pi@raspberrypiBlinkaBridge
sudo? What's sudo? It stands for "superuser do", and it's a program that lets you run powerful commands
which are normally restricted for reasons of safety and security. Or just to prevent accidents!
© Adafruit Industries https://learn.adafruit.com/raspberry-pi-computer-quick-start Page 5 of 9
Update Application List
Once logged into the Pi, we'll do some software updates to make sure we have the latest of everything.
Type:
sudo apt-get update
And then press return. This will run for a little bit as it reads the available package lists, and then finish, reporting that it
is done.
You can now apply any of these changes by typing:
sudo apt-get upgrade
We really really recommend the lastest Raspbian only. If you have an older Raspbian install, run "sudo apt-get
update" and "sudo apt-get upgrade" to get the latest OS!
© Adafruit Industries https://learn.adafruit.com/raspberry-pi-computer-quick-start Page 6 of 9
Type Y and press enter to continue.
Software Setup
Now that the Pi is updated and renamed on the network, we'll make sure we have Python 3 setup, as Python 2 is no
longer used or supported.
pip3, is the software package installer we'll use. Let's upgrade it to the latest version with this command:
sudo pip3 install --upgrade setuptools
If above doesn't work try
sudo apt-get install python3-pip
Once that has finished you'll be returned to the prompt.
Make sure you're using Python 3!
The default Python on your computer may not be Python 3. Python 2 is officially discontinued and all our libraries are
Python 3 only.
We'll be using python3 and pip3 in our commands, use those versions of Python and pip to make sure you're using
3 and not 2.
Install Blinka
Blinka is the software that allows us to run CircuitPython and its libraries on Linux. You can read more about it
here (https://adafru.it/EQa).
To install blinka, type:
sudo pip3 install adafruit-blinka
© Adafruit Industries https://learn.adafruit.com/raspberry-pi-computer-quick-start Page 7 of 9
That's it! You can reboot again if you like.
© Adafruit Industries https://learn.adafruit.com/raspberry-pi-computer-quick-start Page 8 of 9
© Adafruit Industries Last Updated: 2020-10-17 01:14:22 AM EDT Page 9 of 9
Loading...