|
|
(21 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
− | =Install Raspbian= | + | =Syllabus= |
− | ==Prerequisite==
| + | * Project 1: 25% |
− | * 1x Raspberry Pi Zero W | + | * Project 2: 25% |
− | * 1x MicroCenter brand 32gb Series 10 micro SD card (or larder if using another brand) | + | * Project 3: 25% |
| + | * Homework: 20% |
| + | * Discretional: 5% |
| | | |
− | ==Install OS== | + | =Homeworks= |
− | You need to install Raspbian-Full 2018-11-13 version (see link below):
| + | * [[ECE-370: Buy items and install base software]] |
− | * [http://www.files.lofaro.net/os/raspbian/2018-11-13-raspbian-stretch-full.zip Raspbian-Full 2018-11-13 Image] | + | * [[ECE-370: Make GitHub account and 3D design of name plate]] |
− | Once the image is downloaded follow the directions below to install the base image:
| + | * [[ECE-370: Motor Driver open loop speed control, one direction PWM]] |
− | * [https://www.raspberrypi.org/documentation/installation/installing-images/ Raspbian Install Directions] | + | * [[ECE-370: Full H-Bridge]] |
| + | * [[ECE-370: Complete Safety and 3D printing training]] |
| + | * [[ECE-370: Case for RaspberryPi Zero W]] |
| + | * [[ECE-370: Distance Sensor Hookup to uController and "Speed" Encoder Wheel ]] |
| + | * [[ECE-370: Setting up WiFi between your uC and your SBC]] |
| + | * [[ECE-370: FK for Serial Manipulator]] |
| + | * [[ECE-370: Odometry]] |
| + | * [[ECE-370: First Version of Differential Drive Robot]] |
| + | * [[ECE-370: Finalize Control Structure for Differential Drive Robot]] |
| | | |
− | ==Setup Wifi== | + | =Tutorials= |
− | 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.
| + | * [[Install Raspbian]] |
− | # Download the wpa_supplican.conf example file [http://www.files.lofaro.net/misc/wpa_supplicant.conf.example here]
| + | * [[Install uController (M0 with Wifi) for Arduino]] |
− | # Rename wpa_supplicant.conf.example to wpa_supplicant.conf
| + | * [[Hardware External Interrupts on Arduino]] |
− | # Setup your wifi name and password (note: you will be using "eduroam")
| + | * [[Swarm Example Videos]] |
− | ## 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== | + | =Projects= |
− | First you have to mount the 2nd partition (type ext4) on your system
| + | * [[Motor Driver and Servoing]] |
− | * Linux: native support
| + | * [[Cloud Controlled Mobile Robot Design]] |
− | * Windows: use [http://www.ext2fsd.com/ Ext2Fsd] | + | * [[Water Resistant Self Contained Mobile Robot Design]] |
− | * 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
| + | |