Raspberry Pi Laptop Connection For “ laptop” Raspberry Pi 3 image Your kit should contain: 1. Raspberry Pi 3 motherboard contained in a box; 2. MicroUSB to USB cable; 3. Ethernet cable; 4. MicroSD within an SD adapter within a snacksized Ziplock bag; and 5. Gallon Ziplock bag container. Items 14 should be labelled with the same number. Note: Return all these items in their gallon Ziplock container at the end! 1. Install software on your laptop. ● ● Install a VNC viewer client such as RealVNC Viewer https://www.realvnc.com/download/viewer/ Note: W e do not need VNC Connect (the Pi already has a server installed) Windows only: I nstall an SSH client such as putty h ttp://www.putty.org/ 2. Insert the MicroSD card. The MicroSD slot is on the bottom side of the of the motherboard. 3. Connect the Raspberry Pi 3 to power. ● ● Attach the microUSB end of the power cable to the microUSB socket on the Pi. If the other end of the power cable is a USB connector (e.g., for the kit) , attach to a USB socket (e.g., on your laptop). If the other end of the power cable is a power block , attach to a power socket. Look for this: ❏ A red light should appear, indicating that power is connected to the Pi. ❏ A green light should flash, indicating that the Pi operating system is booting. 4. Attach your laptop to the Pi. ● ● If your laptop h as an ethernet port , attach the ethernet cable between that laptop ethernet port and the Pi’s ethernet port. If your laptop d oesn’t h ave an ethernet port , connect the USBtoethernet dongle to a USB port on your laptop, then attach the ethernet cable between that dongle to the Pi’s ethernet port 5. Verify an Ethernet network connection to the Pi. Windows: Macintosh: ● From the S tart menu, select C ontrol Panel , ● Start up to S ystem Preferences , then then N etwork and Internet choose N etwork . ● Once your laptop connects to the Pi (t his ● If using an e thernet port on your Mac , the may take a minute or so ), you will see a Ethernet port should move to the top and popup window about selecting a network show that it is c onnected. location. You can select Home Network or ● If using the k it’s USBEthernet dongle , choose the red X at the top right of the “USB 10/100 LAN” should move near the window to exit that popup. top of list and show a green connection status (image below). T he connection may take a minute or so to complete. Note f or dongle only : I f “USB 10/100 LAN” doesn’t appear in the list, download the driver for “S KU 202023 ” from http://www.cablematters.com/csDownlo ads.aspx . 6. Log into the Pi using SSH. Note: If this is a workshopprovided MicroSD card, p lease do not change the password! If this is y our own MicroSD card , do change the password for security. Windows: ● Open the Putty application (or another SSH client) and enter the IP address 10.0.0.254 , then login with User: p i Password: r aspberry Note: I f this is your first SSH session to this Pi, a popup will appear. Click on Yes to indicate that you trust the Pi. Macintosh: ● Open the Terminal application ● Enter the command s sh email@example.com Password: r aspberry Note: If this is your first SSH session to this Pi, respond Yes to indicate that you trust the Pi. 7. Start a VNC virtual desktop (VNC server) on the Pi. In an SSH session from your laptop to the Pi: ● Enter the command v ncserver The new desktop’s identifier is 1 0.0.0.254:1 as shown in the last line of the vncserver output. (If you enter vncserver more than once, the final component of the identifier will change.) 8. Connect a VNC viewer on your laptop to the VNC virtual desktop. ● ● Open VNC Viewer, and create a new connection to the virtual desktop 1 0.0.0.254:1 Note: O n your first connection to this VNC server, click Continue to indicate you trust the Pi. Enter username p i and password r aspberry . You should see a Raspberry Pi desktop. 9. T o open a terminal window in VNCViewer, click on the icon near the top of the Pi VNC viewer window. (You can also compile and run programs in an SSH session from your laptop to the Pi.) ● SIGCSE Workshop participants: Since this is a different MicroSD system image, you will have to remake any programs you want to run. To quit To close the VNC viewer: Windows: C lick on the red X in the upper right corner of the VNC viewer window. ● You can reconnect to your virtual desktop using VNC viewer later, until that virtual desktop exits on the pi. Macintosh: C lick on the red dot in the upper left corner of the VNC viewer window. ● You can reconnect to your virtual desktop using VNC viewer later, until that virtual desktop exits on the pi. To exit a VNC virtual desktop on the Pi: In an SSH session from your laptop to the pi, e nter the command v ncserver kill :1 for the desktop number :n in your desktop identifier (e.g., 10.0.0.254:1) ● You can use an SSH connection to the Pi to start another virtual desktop later if desired. To close an SSH session: In that SSH session from your laptop to the Pi , enter the command e xit ● You can start another SSH session to the Pi later, and have multiple SSH sessions at once. To shut down the Pi operating system: In an SSH session from your laptop to the pi, e nter the command s udo shutdown h now Allow a few seconds for the Pi’s operating system to shut down . ● The h flag halts the Pi hardware (you could restart by substituting r instead). Note: R eturn all the kit items in their gallon Ziplock container! See first page for list of all kit items.