Getting Started with your Raspberry Pi 3 and NOOBS2.0
Install Operating System Debian
Apple OS and Windows users continue from here:
- Connect Raspberry Pi to Monitor, Keyboard and Mouse. Please refer to How to energize RasPi
- Boot Raspberry Pi.
- Use English(US) and keyboard(us) settings if you are asked.
If you need pictures check here: https://www.raspberrypi.org/learning/software-guide/
- Boot RaspberryPi
- Open Raspberry Pi Configuration application through the top left menu
- Under "Localisation" set the following:
- Set Locale to US
- Set Time Zone to US and Arizona
- Set Keyboard English(US)
- Set Wifi Country to US
- Under "Interfaces" enable:
- Let system reboot
- Connect to network using UAGuest (you will need to register with phone). Start Chromium the default browser (blue ball) and connect to UA network. It might take a while until the login screen appears after your tried to connect to any website.
- Start Chromium and register your Google account in Chromium as one of the user accounts. You will need to add a new user in Chromium. Use your email.arizona.edu google account so you can access all the files on the course website.
Update and Upgrade Operating System
Open Terminal/Command Line Interface and entering following commands (wait until pi@raspberrypi ~ $ reappears between each command)
sudo apt-get update
(20s)sudo apt-get upgrade
, accept all suggested default additions and changes (10mins)sudo apt-get -y dist-upgrade
sudo apt-get -y autoremove
reboot
Remove not needed software (Optional)
sudo apt-get purge wolfram-engine
sudo apt-get clean
sudo apt-get autoremove
Install useful Tools (Optional)
Setup OpenCV (Computer Vision)
- Open Shell/Terminal
- If necessary set date and time
sudo date -s “Tue Nov 1 10:38:00 MST 2016”
- In addition install following libraries and modules
sudo apt-get install libhdf5-dev libhdf5-serial-dev
sudo apt-get install libqtwebkit4 libqt4-test
sudo apt-get install libjasper1
sudo apt-get --yes --force-yes install libatlas-base-dev
wget https://bootstrap.pypa.io/get-pip.py
sudo python3 get-pip.py
sudo pip3 install opencv-contrib-python
sudo pip3 install imutils
- Now you can test some example programs (in terminal/command line interface). First you need to run:
python3
import cv2
- If this does not complete successfully you did not complete the installation script above.
cv2.__version__
- should result in 3. something
exit()
- download the sample files for opencv from here onto your raspberry py home directory. Extract the files.
- Plug in USB camera
cd [to the folder where you extracted the files]
python3 facedetect.py
- If your camera is not plugged in it will load the "Lena" test image. This image is being phased out and is not acceptable for scientific publication anymore as it is a Playboy centerfold image and supports sexism at work
- Press "esc" key to exit the camera
In above instructions replace
ros_comm WITH robot
kinetic WITH melodic
Skip section with unavailable dependencies.
You might want to try some of the tutorials
http://wiki.ros.org/ROS/Tutorials
Setup Programming Environment Visual Studio Code
Follow these instructions https://pimylifeup.com/raspberry-pi-visual-studio-code/
Alternative: Setup Eclipse Programming Environment
In terminal/command line interface:
Obtain the eclipse IDE
sudo apt-get install eclipse
Run eclipse
Install PyDev as Extension into Eclipse. This will allow you to create python programs in Eclipse.
- check version of eclipse
- check which version of PyDev you need: http://www.pydev.org/manual_101_install.html
- find and download the correct PyDev archive on the RasPi
- Unzip the downloaded archive
- eclipse -> Help -> Install new software
- deselect "Group items by category"
- Add -> Local -> select the folder into which you unzipped PyDev
- select PyDev and PyDev Developer Tools
- let it complete and let eclipse restart
Configure Python Interpreter with advanced option, create one for python 2 and one for python 3
- Window->Preference-PyDev->Interpreters -> Advanced Auto Config
- Select python2 and create setting called python2. You can rename the config by double clicking name.
- Repeat above Advanced Auto Config for python3.