Difference between revisions of "ECE-370: Robot Design"

From Lofaro Lab Wiki
Jump to: navigation, search
(Replaced content with "Tutorials: * Install Raspbian")
Line 1: Line 1:
[[Install Raspbian]]
+
Tutorials:
 
+
* [[Install Raspbian]]
=Install Raspbian=
+
==Prerequisite==
+
* 1x Raspberry Pi Zero W
+
* 1x MicroCenter brand 32gb Series 10 micro SD card (or larder if using another brand)
+
 
+
==Install OS==
+
You need to install Raspbian-Full 2018-11-13 version (see link below):
+
* [http://www.files.lofaro.net/os/raspbian/2018-11-13-raspbian-stretch-full.zip Raspbian-Full 2018-11-13 Image]
+
Once the image is downloaded follow the directions below to install the base image:
+
* [https://www.raspberrypi.org/documentation/installation/installing-images/ Raspbian Install Directions]
+
 
+
==Setup Wifi==
+
This section describes how to setup the wifi on your raspberry pi zero w without the need for a keyboard or monitor attached to the device.
+
# Download the wpa_supplican.conf example file [http://www.files.lofaro.net/misc/wpa_supplicant.conf.example here]
+
# Rename wpa_supplicant.conf.example to wpa_supplicant.conf
+
# Setup your wifi name and password (note: you will be using "eduroam")
+
## Change your GMU password, this will ensure it will not expire during the course of the class
+
## Modify "identity" to match your GMU email address
+
## Modify "password" to match your GMU email password
+
# Insert the SD card into your computer
+
# Go to the SD card drive named "boot"
+
# Place the wpa_supplicant.conf created above inside of "boot".  This will automatically copy wpa_supplicant.conf to its required place (i.e. /etc/wpa_supplicant/)
+
 
+
==Setup Hostname==
+
First you have to mount the 2nd partition (type ext4) on your system
+
* Linux: native support
+
* Windows: use [http://www.ext2fsd.com/ Ext2Fsd]
+
* Mac: use the trial of [https://www.paragon-software.com/home/extfs-mac/ Paragon]
+
<!--  $ brew cask install osxfuse
+
  $ brew install ext4fuse
+
  $ sudo ext4fuse /dev/diskNsM $HOME/tmp/my-linux-mount -o allow_other
+
-->
+
 
+
Now  you have to edit two files within the above mounted files system:
+
# Edit /etc/hostname - Replace "raspberrypi" with the desired name (no spaces) of your computer, please make it unique)
+
# Edit /etc/hosts - Replace "raspberrypi" with the <u>same</u> hostname as listed above
+
 
+
==Enable SSH==
+
In the root of the "boot" partition make an empty file named "ssh" (please note there is NOT file extension.  To do this, within a terminal/console change directories to the "boot" partition.  Then write the following in the terminal/console (depending on your OS.
+
* Linux: $ touch ssh
+
* Mac: $ touch ssh
+
* Windows: $ type NUL > ssh
+
This puts an empty files named "ssh" in the boot folder which tells the system to enable ssh on boot.
+
 
+
==Boot the PI and connect via SSH==
+
This part will tell you how to boot the pi and ssh to it.  Please make sure your computer is connected to "eduroam"
+
# Insert the micro SD card into the raspberry pi
+
# plug the raspberry pi into a USB port (USB 3.0 or a charger is preferable)
+
# Wait about 5 minutes (first boot up only).  This is because the image is resizing its self to fit the SD card.
+
# Check to see if your device is connected - this is done by pining the device within a terminal: $ ping <your host name from above>.eduroam.gmu.edu Note: if you get a non-zero time response then it is connected.
+
# Open your ssh client (Mac/Linux use terminal, for Windows use [https://www.putty.org/ PuTTY]) and connect to the PI with the following info:
+
#* Host: <your host name from above>.eduroam.gmu.edu>
+
#* User: pi
+
#* Password: raspberry
+
# Accept the "ECDSA key fingerprint" if asked
+
# Once logged in change your password via:
+
#* $ passwd
+
You raspberry pi zero w is now set up and you can connect to it via the "eduroam" network.
+
 
+
==Update to the latest libraries==
+
Run the following to ensure you are running the latest libraries for the distribution
+
  $ sudo apt-get update
+
  $ sudo apt-get upgrade
+
This may take a while, do NOT disconnect for the network or unplug the raspberry pi.  Once done reboot the pi.
+
  $ sudo reboot
+
 
+
==Adding a "home" network to your wifi==
+
You may want to connect to your pi while you are on your home network, in this case you need to add a second network (with less priority) to you wpa_supplicant.conf.  To do this edit yoru wpa_supplicant.conf located in /etc/wpa_supplicant/wpa_supplicant.conf.  Add another "network" to the bottom of the page with a priory having a greater number than the "eduroam" network.  The example below has a priority of 10.  This will let the system connect to eduroam first and if not available then the home network.
+
 
+
  network={
+
      ssid="your network SSID"
+
      psk="your network password"
+
      id_str="home"
+
      priority=10
+
  }
+
 
+
==Other items to install==
+
* VIM
+
  $ sudo apt-get install vim
+
* Screen
+
  $ sudo apt-get install screen
+
* GIT
+
  $ sudo apt-get install git
+

Revision as of 23:11, 27 January 2019

Tutorials: