Difference between revisions of "Autostarting Raspberry Pi Using VNC Viewer"

From ESE205 Wiki
Jump to navigation Jump to search
Line 16: Line 16:
  
 
'''Downloading VNC on the Pi'''
 
'''Downloading VNC on the Pi'''
 +
 
Use the command "vncserver" in terminal on the Pi to install the necessary VNC software.
 
Use the command "vncserver" in terminal on the Pi to install the necessary VNC software.
  
 
'''Downloading VNC Viewer on Your Computer'''
 
'''Downloading VNC Viewer on Your Computer'''
 +
 
Go to the URL https://www.realvnc.com , to create a VNC Viewer account and for the free download. Be sure to write down your username and password.  
 
Go to the URL https://www.realvnc.com , to create a VNC Viewer account and for the free download. Be sure to write down your username and password.  
  
 
====Finding Your Pi's IP Address'====
 
====Finding Your Pi's IP Address'====
 +
 
To find your Pi's IP address, first open terminal. Once in terminal, type in the command "sudo ifconfig". Upon entering this command, you will receive lots of of information about your pi. To find the necessary IP address for autostart, look for the section of the output that reads "wlan0". Under this section, there IP address will be listed after it says "inet addr:". Write down this IP address to use later.
 
To find your Pi's IP address, first open terminal. Once in terminal, type in the command "sudo ifconfig". Upon entering this command, you will receive lots of of information about your pi. To find the necessary IP address for autostart, look for the section of the output that reads "wlan0". Under this section, there IP address will be listed after it says "inet addr:". Write down this IP address to use later.
  
 
====Launch of VNC====
 
====Launch of VNC====
 +
 
Now, you should be able to launch VNC from your computer. Run the Raspberry Pi using the monitor, keyboard, HDMI, and MicroUSB. Now Launch the VNC Viewer, log into your VNC Viewer Account, and type in the Pi's IP address for the server you would like to access. An icon will appear with the corresponding IP address. Click on this icon, and a display of the Raspberry Pi server will appear on the screen, matching that displayed on the monitor.  
 
Now, you should be able to launch VNC from your computer. Run the Raspberry Pi using the monitor, keyboard, HDMI, and MicroUSB. Now Launch the VNC Viewer, log into your VNC Viewer Account, and type in the Pi's IP address for the server you would like to access. An icon will appear with the corresponding IP address. Click on this icon, and a display of the Raspberry Pi server will appear on the screen, matching that displayed on the monitor.  
  
 
===Coding Pi to Autostart===
 
===Coding Pi to Autostart===
 +
 
In this section, we code the Pi so that no HDMI, monitor, or keyboard is required during startup.  
 
In this section, we code the Pi so that no HDMI, monitor, or keyboard is required during startup.  
  

Revision as of 04:33, 12 December 2017

Autostarting Raspberry Pi Using VNC Viewer

Purpose

The Raspberry Pi is an incredible tool to use for many different types of engineering projects. The Pi is a mini-computer; it can be programmed, used as a web browser, store memory, among other things. However, in order to use the Pi, you must have access to a micro USB (power source), a monitor, an HDMI cord, and keyboard (as well as a micro SD card that must always be in the Pi). In many engineering projects involving the Pi, it takes a considerable amount of time using the Pi across many different sessions. This leads to complications, as Pi users are restricted to working in environments where they have access to monitors, keyboards, and HDMI cords. VNC viewer is a helpful way to launch the Pi interface on a computer, but that setup also takes time.

The purpose of this tutorial is to save engineers time in their product development. Once this tutorial is completed, the Pi will be able to autostart using only its power source plugged into a computer, keyboard-free, monitor-free, and HDMI-free.

Using VNC Viewer

Configure Raspberry Pi

Refer to the following tutorial for instructions on how to configure the Pi: https://classes.engineering.wustl.edu/ese205/core/index.php?title=Set_Up_and_Configure_a_Raspberry_Pi

Before you deploy this tutorial, make sure to check which version of Raspberry Pi you have. If you have a Raspberry Pi 3, step 4 of the tutorial does not apply, and to connect to wifi directly on the Pi. If you run into issues during the configuration, be sure you are using the most recent version of NOOBS or Raspbian on the official Raspberry Pi page.

Preliminary Downloads

Downloading VNC on the Pi

Use the command "vncserver" in terminal on the Pi to install the necessary VNC software.

Downloading VNC Viewer on Your Computer

Go to the URL https://www.realvnc.com , to create a VNC Viewer account and for the free download. Be sure to write down your username and password.

Finding Your Pi's IP Address'

To find your Pi's IP address, first open terminal. Once in terminal, type in the command "sudo ifconfig". Upon entering this command, you will receive lots of of information about your pi. To find the necessary IP address for autostart, look for the section of the output that reads "wlan0". Under this section, there IP address will be listed after it says "inet addr:". Write down this IP address to use later.

Launch of VNC

Now, you should be able to launch VNC from your computer. Run the Raspberry Pi using the monitor, keyboard, HDMI, and MicroUSB. Now Launch the VNC Viewer, log into your VNC Viewer Account, and type in the Pi's IP address for the server you would like to access. An icon will appear with the corresponding IP address. Click on this icon, and a display of the Raspberry Pi server will appear on the screen, matching that displayed on the monitor.

Coding Pi to Autostart

In this section, we code the Pi so that no HDMI, monitor, or keyboard is required during startup.

Pi Programming in Terminal