- HOME
- SDR & GNU Radio
- RPi PROJECTS
- RADIO RPi PROJECTS
- NUC 8
- SATELLITES
- WEATHER SATELLITES
- RADIO ASTRONOMY
- QRZ
-
|
WA9ONY Raspberry Pi Computer Projects
|
|
This is a collect of
Raspberry Pi
(RPi)
computer
projects that
David Haworth,
WA9ONY
has done in order to learn how to use the RPi.
These projects range from building a RPi P3 Model B system (Project 1) to the simple task of setting the RPi date and time (Project 26).
There is a separate web page, Amateur (Ham) radio RPi projects,
that demonstrates how to use the
RPi computer
in
amateur (Ham) radio
and in electronics applications.
The above photo show three different Raspberry Pis.
- Top left side is Raspberry Pi Zero for $5
- Bottom left side is Raspberry Pi Zero W for $10
- Right side is Raspberry Pi Zero Model 3 B+ for $35
Raspberry Pi Popularity
In 2018 over 19 million RPis have been sold to students, hobbyist and used in commercial products.
This results in a very large installed base of RPi users, applications, hardware, softwares and infrastructure to learning about RPi hardware and software.
Raspberry Pi Computers
There are several generations of
Raspberry Pi
(RPi) computers.
- 2012 RPi P1 Models
- 2015 RPi P2 Models
- 2015 RPi ZERO, small form factor, reduced capability
- 2016 RPi P3 Models, highest performance, shown in above photo.
- 2017 RPi ZERO W, small form factor, reduced capability, WiFi
- 2018 RPi P3 Model B+, highest performance RPi.
RPis are:
RPis computer system is:
- RPi P3 Models
SBC.
- Power supply with micro USB connector, 5 V, best to have 2.4 A.
- Micro SD card with NOOBS (Element14
NOOBS
16 GB SD card with
Raspbian
operating system).
- USB keyboard.
- USB mouse.
- Display with cable (TV with HDMI input works great because it supports sound).
- Nice to have options:
- Case to protect the RPi
- WiFi or LAN connected to the Internet to download software and software updates, browse Internet, etc.
- Powered USB Hub to use USB SDR, portable USB hard drives, etc.
- USB memory device for file storage
Raspberry Pi Software
The Raspberry Pi official operating system software is
Raspbian.
But, other operating system software can be used on the RPi.
- Raspbian has graphical user interface
(GUI)
called PIXEL and a text based command line interface
(CLI).
- Raspbian is based on the
Debiab
distribution of
Linux.
- The free
Linux
operating system
is based on the
UNIX operating system.
The RPi Raspbian includes many programs as part of the standard install process using the Element14
NOOBS 16 GB SD card.
RPi has a large online repository of software ready to be automatically downloaded and installed on the RPi.
RPi Computer Projects Index by Category
RPi Information & Stores
RPi Hardware
Display System & Video
RPi Zero W
Power Supply
Raspbian OS
Networking
Other OSes
Audio & Sound System
RPi Apps
Utilities
CLI: Command Line Interface
Programming
GPIO: General Purpose Input/Output
Miscellaneous
RPi Computer Projects Index by Project Number
These projects demonstrate how to assemble a
RPi computer
system and how to use the
Raspbian
operating system
and its
software.
- Project 1: Assemble RPi P3 Computer
- Project 2: Identify the Initial Programs in the RPi PIXEL
GUI
- Project 3: Using USB Memory Devices
- Project 4: Update RPi Software and GPU Firmware
- Project 5: Download The MagPi Magazine And Read It Off-Line
- Project 6: Create an USB Memory Library
- Project 7: Save Internet Web Pages (HTML), Audio (MPG3), Documents (PDF) and Text (TXT) files on the RPi
- Project 8: Back Up the RPi Micro-SD Card
- Project 9: Save a Web Page as a PDF File And View It Off-Line
- Project 10: Download YouTube Video and Play It Off-Line
- Project 11: RPi Raspbian Desktop GUI and Command Line Interfaces
- Project 12: RPi Username and Password
- Project 13: RPi Raspbian Files
- Project 14: RPi Raspbian Directories/Folders
- Project 15: RPi Raspbian Keyboard Short Cuts
- Project 16: Install GIMP, GNU Image Manipulation Program
- Project 17: Install YouTube Video Download Program
- Project 18: Bash Shell Command Line Interface (CLI)
- Project 19: Create Python 3 Hello World Program
- Project 20: Monitor Display Resolution
- Project 21: Memory Free
- Project 22: Stop or Kill an Unresponsive Program
- Project 23: Show RPi CPU Temperature
- Project 24: Show RPi CPU Frequency
- Project 25: Install VLC Media Player
- Project 26: Get and Set Date and Time
- Project 27: Change the Desktop Wallpaper
- Project 28: RPi Portable Battery Operation
- Project 29: Copy and Past Between Chromium Web Browser and Terminal CLI
- Project 30: Save Terminal CLI Text
- Project 31: Get the Raspberry Pi Weekly Newsletter
- Project 32: Learn About RPi & Linux From Magazines
- Project 33: Watch Raspberry Pi Videos
- Project 34: Join the Raspberry Pi Foundation Forum
- Project 35: Get RPi P3 Model B Specifications
- Project 36: Learn About the Raspberry Pi From Books
- Project 37: Learn About the Raspberry Pi From Tutorials, Workshops & Classes
- Project 38: Install ImageJ, An Image Processing & Analysis Program
- Project 39: Learn About the Raspberry Pi Foundation
- Project 40: Install Audacity, Audio Editor Program
- Project 41: Install Stellarium, A 3D Photo-Realistic Sky Chart Program
- Project 42: Shutdown a RPi
- Project 43: Change the HDMI Display Resolution after Power-On
- Project 44: Benchmark the RPi P3 Model B
- Project 45: Help, Manuals, etc. On The RPi
- Project 46: Environment Variables
- Project 47: Install X Applications
- Project 48: File Names & Extensions
- Project 49: Install ImageMagick
- Project 50: Install XFig
- Project 51: Bash Shell Job Control
- Project 52: Install Ardour, Digital Audio Workstation
- Project 53: RPi Zero W: Assemble the Computer
- Project 54: Password Security
- Project 55: Bash Script: Update/Upgrade RPi Software & Firmware
- Project 56: Touchscreen Display
- Project 57: RPi Zero W: Install Camera
- Project 58: RPi Zero W: Build a Case Holder
- Project 59: Install ALSA: Advanced Linux Sound Architecture Player
- Project 60: Warning Icons: High Temperature & Under Voltage
- Project 61: RPi Portable Battery Operation
- Project 62: IP Address
- Project 63: SSH: Secure Shell Remote Control
- Project 64: SSH File Transfer Protocol
- Project 65: RPi Zero W: Portable Headless Camera
- Project 66: SSH: X11 Forwarding
- Project 67: Install SoX: Sound eXchange
- Project 68: Bash Script: myRPi Information
- Project 69: Bash: Bash: Command-line Completion
- Project 70: RPi Zero W: Camera Bash Script
- Project 71: Install Firefox Browser
- Project 72: scrot: Screen Capture
- Project 73: WiFi Tools
- Project 74: HDMI Display Resolution Changes with Terminal
- Project 75: Creating and Writing a RPi Image File (.img)
- Project 76: FAT32 Formating RPi micro SD Card
- Project 77: Berry Boot
- Project 78: openSUSE Operating System Install
- Project 79: Ubuntu Operating System Install
- Project 80: Command Line History
- Project 81: RPi Powered by 12 Vdc
- Project 82: RPi Stores
- Project 83: RPi Using the iPhone for Internet Connection
- Project 84: RPi Zero W Breadboard
- Project 85: RPi Zero W Breadboard Testing Voltage
- Project 86: Nano Command Line Text Editor
- Project 87: RPi Zero W Breadboard Remote Python Programming
- Project 88: SSH: Enable SSH
- Project 89: RPi Zero W Breadboard Testing GPIO23 with DMM
- Project 90: Install XScreenSaver
- Project 91: Virtual Consoles (VC)
- Project 92: PIXEL Multiple Desktops
- Project 93: CLI Wildcard Characters
- Project 94: CLI BASH Version
- Project 95: Text Expansion with Braces
- Project 96: Wolfram Mathematica
- Project 97: sed: Stream Editor
- Project 98: LibreOffice Impress Templates Download
- Project 99: RPi Raspbian to Unix Timeline
- Project 100: HDMI Video Capture
- Project 101: Install gnome-screenshot
- Project 102: Introduction to Raspbian Sound System
- Project 103: CPU Info
- Project 104: Raspbian Release Info
- Project 105: Installing Raspbian GNU, Linux 9 (stretch)
- Project 109: Install Octave
- Glossary
Project 1: Assemble RPi P3 Computer
Learn what is needed. Gather components and assemble the Raspberry Pi P3 Model B computer.
Setup the operating system preferences.
- Get Components
- Amazon
- Fry's Electronics in Wilsonville, OR
- Element14 NOOBS (New Out Of Box Software) 16G micro-SD card
- The SD card is formatted and has NOOBS software on it.
- No internet connection is required during the initial setup for using
Raspbian operating system.
- See the Element14 video on how to use the Element14 NOOBS 16G SD card
- Element14
Raspberry Pi P3 B case
- Case snaps together with no screws or tools.
- Top and side lids to access the Raspberry Pi P3 B GPIO pins.
- Goodwill
- Used TV with HDMI input
- Used HDMI full size cable
- Used USB keyboards
- Used USB mouse
- Assemble the RPi components
- Install the two heat sinks.
- Install RPi board in case.
- Plug the NOOBS micro-SD card into the computer board.
- Plug the HDMI cable into the HDMI TV and computer board.
- Plug the USB keyboard into the computer board.
- Plug the USB mouse into the computer board.
- Do not plug the power supply in yet.
- First Power On of the RPi
- Remove RPi case top for better cooling.
- Turn on the HDMI TV.
- Select HDMI input on the HDMI TV.
- Plug in the RPi power supply.
- Watch the power on screens. It took less than five minutes.
- Graphical User Interface (GUI) will automatically start.
- Set RPi Configuration for the Operating System
- Review the video if needed.
- Set Locale
- Set Timezone
- Set Keyboard
- Set WiFi country
- Set WiFi password if used
- Shutdown Procedure
- It is important to safety shutdown all programs and then shutdown the operating system before turning off the power to the RPi.
- In the GUI select Shutdown
- Turn off RPi, HDMI TV and other accessories such as power USB hub.
Project 2: Identify the Initial Programs in the RPi
PIXEL
GUI
This goal is to identify the standard programs in the
GUI
that are installed by Element14 NOOBS micro-SD card.
Raspbian
is a Debian-based computer operating system for Raspberry Pi.
Raspbian uses
PIXEL,
Pi Improved Xwindows Environment, Lightweight as its main desktop environment.
Click on the below links to learn more about these programs at Wikipedia.
- GUI
LibreOffice Menu
- LibreOffice Base
- LibreOffice Calc
- LibreOffice Draw
- LibreOffice Impress
- LibreOffice Math
- LibreOffice Write
- GUI Games Menu
- Minecraft Pi
- Python Games
- GUI Accessories Menu
- Archive
- Calculator
- File Manager
- Image Viewer
- PDF View
- SD Card Copyier
- Task Manager
- Terminal
- Text Editor
- GUI Help Menu
- Debian Reference
- Raspberry Pi Help
Project 3: Using USB Memory Devices
This goal is to use an USB memory devices with the RPi to move files to/from the RPi. An USB memory is used as a backup to the user files on the RPi micro-SD card.
- The RPi GUI is running.
- Plug in the USB memory into the RPi.
- A window appears to opens File Manager to view the files on the USB memory.
- Take note of the directory location of the USB memory device.
- Practice exercise
- Open a new File Manager and open the USB memory device.
- Drag and drop files/directories to/form the memory device.
- Removing USB memory device
- Select a drive in menu to eject safely
- Success will show the message device has been ejected, Is is now safe to remove the device.
- Remove USB memory device from the RPi.
- USB memory results
- RPi supports USB 2.0 devices. USB 3.0 devices will work at USB 2.0 speeds.
- HP 32 G USB 3.0 memory stick worked fine
- Seagate 4 T USB 3.0 portable hard drive work fine.
Project 4: Update RPi Software and GPU Firmware
An Internet connect is required to update the RPi software.
The
update
process can take a long time, greater than one hour.
The installation process might ask you questions, therefore check it so often.
Updating and upgrading RPi
- The RPi GUI is running.
- Select GUI memu, Help, Raspberry Help
- On the RPi webpage select Software Guide
- Select Learning to update your computer.
- Check unused SD disk space
- Get the update file locations from the Internet
- Install the updates
- sudo apt-get upgrade
- sudo apt-get dist-upgrade
- Commands to get version numbers
- uname -a
- /opt/vc/bin/vcgencmd version
- cat /etc/issue
- cat /etc/debian_version
Updating RPi
GPU
firmware.
- Check the firmware version
- Get the update file locations from the Internet
- Install the updates
- Important, reboot the RPi.
GitHub
raspberrypi/firmware
Project 5: Download The MagPi Magazine And Read It Off-Line
The MagPi is the official magazine of the
Raspberry Pi Foundation.
It is available as a free download. Also, learn how to save PDFs from the Internet and view them on the RPi.
You will need an Internet connection.
- Start Chromium web browser by clicking on the blue glob icon in the top task bar.
- Enter the URL www.qrz.com
- Enter the call sign WA9ONY and search for it.
- Go to bottom of the WA9ONY web page and click on the Raspberry Pi Computer Hints link.
- Bookmark the Raspberry Pi Hints web page by clicking on the star icon in the URL box.
- Click on The MagPi issue 55 to view it.
- Use the right and left arrows to page through the magazine.
- Move the mouse cursor to the top edge of the magazine to see the pop out menu and select the download arrow icon to save the issue to the RPi Download directory.
Second method, you will need an Internet connection. Change the issue number for the issue you want to download.
MagPi guides.
View the download magazine PDF.
- Open File Manager by clicking on the folders icon in the top task bar.
- In the File Manager right window double click on Downloads folder.
- Right click on MagPi55.pdf file and select Open to view the magazine PDF file.
MagPi on the
Internet Archive.
Project 6: Create an USB Memory Library
Create a library on a USB memory device for PDF files from the Internet. For example, PDF issues of The MagPi magazine are stored in the library. The benefit of having the library on a USB memory device is not taking up storage space on the RPi SD card. Also, you can easy move the library on USB memory device to other computers.
You will need an Internet connection and USB memory device.
- The RPi GUI is running.
- Plug the USB memory device into the RPi.
- At the Removable medium is inserted window click OK.
- In File Manager right click on the right window to Select New...>Folder.
- In Creating New Folder window name the folder Library and click OK.
- Double click on the Library folder to open it.
- In the empty Library folder right click on the right window to Select New...>Folder.
- In Creating New Folder window name the folder MagPi and click OK.
Next copy The MagPi issue 55 that was download in Project 5 to the Library.
- Open another File Manager by clicking on the File Manager icon in the top task bar.
- Double click on the Download folder to see its contents.
- Click on the MagPi55.pdf issue and drag it to the Library MagPi folder.
- To view the contents of Library MagPi folder double click on it
- To view the PDF file Right click on the PDF file and select Open.
Add the PDF version of this web page to the Library.
- Create WA9ONY folder in the Library folder
- Download the PDF version of this web page at PDF file
- Copy the Raspberry Pi Hints.pdf file from the Downloads folder to the Library WA9ONY folder
- Open the WA9ONY folder and double click on the Raspberry Pi Hints.pdf file
Project 7: Save Internet Web Pages (HTML), Audio (MPG3), Documents (PDF) and Text (TXT) files on the RPi
To save web pages to the RPi use the wget command in the Terminal window.
Save the web page at http://www.stargazing.net/david/rpi/ to the Download directory. In the URL the last part is rpi which is a directory (folder). The web server will send the file index.html when no file name is in the URL.
- Open the Terminal window by clicking on the Terminal icon in the top menu bar.
- Change directory to Downloads by entering the following command
- Get the web page and support files at http://www.stargazing.net/david/rpi/
- wget -H -k -p http://www.stargazing.net/david/rpi/
- View the downloaded web page.
- Open File Manager by clicking on the File Manager icon in the top task bar menu.
- Open the Downloads folder by double clicking on it.
- The web page is called index.html and it is located in www.stargazing.net/david/rpi/ folder
- Use File Manager to find the index.html file and double click on it to open it.
Save the PDF file (Raspberry%20Pi%20Hints.pdf) at http://www.stargazing.net/david/rpi/ to the Downloads directory. Notice the %20 in the file name mean space character.
- Open the terminal window by clicking on the Terminal icon in the top menu bar.
- Change directory to Downloads by entering the following command
- Get the Raspberry Pi Hints.pdf file at http://www.stargazing.net/david/rpi/
- wget http://www.stargazing.net/david/rpi/Raspberry%20Pi%20Hints.pdf
- View the downloaded PDF file.
- Open File Manager by clicking on the File Manager icon the the top task bar menu.
- Open the Downloads folder by double clicking on it.
- Open the Raspberry Pi Hints.pdf file by double clicking on it.
Save the MP3 audio File from
ARRL 5 WPM Code Practice Archive
to the Downloads directory.
Use wget to download the 5 WPM Code Practice Archive audio file.
- Audio file URL
- http://www.arrl.org/files/file/Morse/Archive/5%20WPM/170215_05WPM.mp3
- Terminal command
- wget http://www.arrl.org/files/file/Morse/Archive/5%20WPM/170215_05WPM.mp3
- In Terminal use the below command to play the audio using HDMI TV speakers.
- omxplayer -o hdmi 170215_05WPM.mp3
- In Terminal use the below command to play the audio using the audio jack on the RPi.
- omxplayer -o local 170215_05WPM.mp3
Save the MP3 text File from
ARRL 5 WPM Code Practice Archive
to the Downloads directory.
Use wget to download the 5 WPM Code Practice Archive text file.
- Text file URL
- http://www.arrl.org/files/file/Morse/Archive/5%20WPM/170215_05.txt
- Terminal command
- wget http://www.arrl.org/files/file/Morse/Archive/5%20WPM/170215_05.txt
- In File Manager double click on the text file to view it.
- For more information on the wget, omxplayer command enter the below command in the Terminal window.
Using what you have learn in the previous projects save these file to the USB memory device Library folder.
Project 8: Back Up the RPi Micro-SD Card
It is important to be able to back up the RPi and restore all the files.
There are many ways to doe this. Below is the procedure to create a copy of the micro-SD card that is in your RPi.
First, you will need as micro-SD card equal to or larger than the micro-SD size in your RPi.
Secondly, you need a micro-SD to USB adapter to make at copy with the micro-SD in the USB port.
- Make sure there is no USB memory device plugged into the RPi USB ports.
- Plug the micro-SD into the USB adapter.
- Plug the micro-SD/USB adapter into the RPi USB port.
- Select Accessories, SD Card Copier.
- Read the help and make a copy of your micro-SD card with the operating system and all other files.
- When copying is complete, turn off the RPi, remove both micro-SD cards.
- Install the micro-SD copy into the SD slot.
- Power-on the RPi and you are read to go.
- Put the other micro-SD in a safe place.
Project 9: Save a Web Page as a PDF File And View It Off-Line
When a web page has useful information that you want to refer to when you have no Internet access you can save the web page as a PDF file to your RPi for off line viewing.
The web page of Wikipedia
Raspberry Pi
is saved as a PDF to the RPi.
This example uses RPi 3 Model B with Google
Chromium
web browser. This was installed by the Element14 NOOBS 16 G SD card.
- Start Chromium by clicking on its Web Browser icon (blue globe) in the top left side menu of RPi desktop.
- Enter Raspberry Pi in the browser URL box and the enter key.
- The search shows a list of web sites, select Raspberry Pi - Wikipedia.
- In Chromium in the right corner select the three vertical dots icon to open the Customize and control Chromium menu.
- In the Chromium Customize and control Chromium menu select Print.
- Note, my RPi has no printer installed and default is to save as PDF file.
- Wait for the Loading Preview to finish.
- Notice, the destination is save as PDF. Therefore, click on the Save button to create a PDF of the web page.
- In the Save File window select the destination folder and if you want change the file name of the PDF. Click on Save.
- I save PDFs to the Downloads folder and later copy them to the USB library (See Project 6).
- Use File Manager to open the folder where the PDF file was saved and double click on the PDF file to view the contents.
Project 10: Download YouTube Video and Play It Off-Line
YouTube videos are are great source of information. Below a way to download a YouTube video and view it off-line.
This example uses RPi 3 Model B with Google
Chromium
web browser. This was installed by the Element14 NOOBS (New Out Of the Box Software) 16 G SD card.
- Start Chromium by clicking on its Web Browser icon (blue globe) in the top left menu of RPi desktop.
- Enter the YouTube link
https://youtu.be/f5CHEfdVE-Y for the
Introducing the Raspberry Pi 3 Model B with on board WiFi and Bluetooth video
in the browser URL box and the enter key.
- Stop the video from playing by clicking on the two vertical parallel lines icon below the video.
- In the Chromium URL insert the two letters SS before youtube.
- On the waveform.net web page click on the green Download button.
- On the bottom of Chromium browser watch the download progress and make note of the video file name.
- The download video file will be in the Downloads folder.
To play the video use omxplayer in the Terminal window. The omxplayer is a command line program.
- Click on the Terminal icon in the desktop top menu.
- Change the working directory to Downloads.
- To view the video run omxplayer with the video file name. In my case the video file name is videoplayback.mp4. Note, omxplayer plays mp4 video files.
- omxplayer -o hdmi videoplayback.mp4
A HDMI TV that supports audio is used as the monitor for the RPi. To use the audio output jack on the RPi board use the command. Use the command man omxplayer for more details on the omxplayer.
- omxplayer -o local videoplayback.mp4
Using what you have learn in the project 6 to save the video file to the USB memory device Library folder.
Project 11: RPi Raspbian Desktop GUI and Command Line Interfaces
The PRi computer can run different operating systemsi.
Raspbian
is the official operating system.
Raspbian is a
Debiab
distribution of the
Linux.
Linux is based on
UNIX.
Raspbian has two primary user interfaces:
LXDE
(Lightweight X11 Desktop Environment)
desktop
GUI
(graphical user interface)
and the
CLI (command line interface).
In 2016 Raspbian LXDE GUI was improved with
PIXEL
(Pi Improved Xwindows Environment, Lightweight).
The RPi Raspbian can be configured to power-on into the LXDE PIXEL desktop GUI or the CLI.
- In the LXDE PIXEL Desktop GUI open the top left Application Menu and select Preferences, Raspberry Pi Configuration.
- In System tab, select Boot to Desktop or Boot to CLI.
To access the CLI in the PIXEL Desktop GUI open a Terminal window with the Terminal icon in the top menu bar.
If the PIXEL Desktop is not running you start PIXEL Desktop GUI by entering the command startx in the CLI.
Project 12: RPi Username and Password
During the first time power-on the software will create the username pi with password
raspberry.
The default power-on auto login is to login in as 'pi' user.
This can be changed by:
- In the LXDE PIXEL Desktop GUI open the top left Application Menu and select Preferences, Raspberry Pi Configuration.
- In System tab, check or uncheck Login in as 'pi'
Another user name is super user.
Use the sudo (super user do) command in front of another command to run the command with admin privileges.
Project 13: RPi Raspbian Files
A
computer file contains date/information,
executable program code, etc.
In Raspbian the file name is case sensitive. There for the file example/ and Example are two different files. It is good practice to use
file extensions
to tell the RPi what is file type and as a result what program should be used to open it.
For example, file example.txt is a
text file
and Raspbian would use Leafpad to open it when double clicking on the example.txt file in File Manager.
Another example, file example.pdf is a
Portable Document Format file
and Raspbian would use xpdf program to open it when double clicking on the example.pdf file in File Manager.
It is a good computer practice to use file extension on the files you create.
List of Raspbian file extensions and the Desktop default programs that will open them.
- File associations in the GUI
Project 14: RPi Raspbian Directories/Folders
Directories
(also called folders) are a way to organize files and directories.
Directories/folders contain files and other Directories/folders. The Directories/folders are organized in hierarchal directory tree. The top directory is called root and is represented by "/" Character.
One of the directories in the root directory is the home directory.
The home directory contains the directories and files of users.
In a typical PRi system of on one user there is only the pi directory for the username pi.
In the pi directory is where all the files create by the user pi should be saved. The user can create directories and sub directories in pi directory to organize files.
In the PIXEL Desktop GUI use File Manage to view, move, create, rename and delete directories and files. File Manager is started by clicking on the File Manager icon in the top menu bar.
In the CLI text commands are used view, move, create, rename and delete directories and files.
- List directory
- For command manual enter: man ls
- ls
- Print working directory
- For command manual enter: man pwd
- pwd
- Change directory
- Change directory up one level
- Change directory to root
Project 15: RPi Raspbian Keyboard Short Cuts
- Ctrl-ESC opens application memu
Project 16: Install GIMP, GNU Image Manipulation Program
GIMP (
GNU
Image Manipulation Program)
is a free
raster graphics editor
that is in the RPi online repository.
Internet connection is required and commands in the CLI are used.
To install GIMP.
- Update the repository index on the RPi.
- sudo apt-get update
- For help
- man apt-get
- apt-get --help
- Search the RPi repository index for GIMP programs.
- Install GIMP.
- sudo apt-get install gimp
- Start GIMP.
- In the PIXEL Desktop GUI open the top left Application Menu and select Graphic, GNU Image Manipulation Program.
- In GIMP Open a graphics file (PNG, JPG, etc.) for editing or viewing.
Install GIMP help.
- sudo apt-get install gimp-help-en
- In GIMP top menu select Help, Help to open GIMP help manual.
To uninstall GIMP and GIMP help.
- sudo apt-get uninstall gimp
- sudo apt-get uninstall gimp-help-en
Using GIMP F1 help.
- In GIMP top menu move mouse over File, Create, Screenshot then select F1 to open GIMP screenshot help.
GIMP website.
GIMP resources:
Additional information is at
- /usr/share/doc/gimp.
- /usr/share/doc/gimp-data.
- /usr/share/doc/gimp-help-commands.
- /usr/share/doc/gimp-help-en.
Project 17: Install YouTube Video Download Program
This CLI program downloads YouTube videos to the RPi.
To install youtube-dl program.
- Update the repository index on the RPi.
- sudo apt-get update
- For help
- man apt-get
- apt-get --help
- Search the RPi repository index for youtube-dl programs.
- apt-cache search youtube-dl
- Install youtube-dl.
- sudo apt-get install youtube-dl
To uninstall youtube-dl.
- sudo apt-get uninstall youtube-dl
Play saved YouTube video file in Downloads directory.
- Use the browser to get the YouTube URL.
- In the browser copy the video URL.
- Open Terminal window.
- In CLI change working directory to Downloads
- In CLI enter the command youtube-dl with URL.
- Video file is saved to Downloads directory.
- Use omxplayer to play video file to HDMI monitor that has sound.
- omxplayer -o hdmi video_file_name
- Use omxplayer to play video file to monitor with no sound, sound jack is used on RPi board.
- omxplayer -o local video_file_name
The youtube-dl saves the video file with the same name as the YouTube title.
Additional information is at /usr/share/doc/youtube-dl.
Project 18: Bash Shell Command Line Interface (CLI)
The RPi default shell is the
bash shell.
The bash shell is used at the CLI (command line interface)
to work with the RPi
Linux kernel
and other programs on the RPi.
There are somethings that can only be done using the
CLI (command line interface).
For example, installing programs on the RPi as shown in project 16 installing GIMP.
The CLI is used when the PIXEL Desktop GUI is not being used and the CLI is used in the PIXEL Desktop GUI Terminal program.
The benefit of using the PIXEL Terminal is mouse cut and past editing is supported.
Using the CLI.
Mouse operation:
- No mouse operations when not using Terminal window in PIXEL Desktop GUI.
- In Terminal window mouse past text at cursor position.
- In Terminal window mouse selects any text to copy and text can be pasted in other programs like Leafpad.
Ctrl key operation
- Ctrl-c Kill the current process.
- If a command/program is running, Ctrl-c stops the command/program and starts an new command line.
- Ctrl-d Log out from the current Terminal.
- Ctrl-d Send EOF to the current process.
- Ctrl-q Resume transfer to the terminal.
- Ctrl-s Stop the transfer to the terminal.
- Ctrl-z Send current process to the background.
Keyboard arrow keys operation
- Up arrow goes through the history of commands to the oldest command entered.
- Down arrow goes through the history of commands to the most recent command entered.
- Keyboard left and right arrows move the cursor through the line
Other special operations.
- Keyboard backspace and delete keys work as expected.
- Ctrl-c exits a line text and starts an new command line.
- Tab auto finishes the file name or directory name in the working directory.
- Use ; to separate multiple commands on the same line
- ~ is home directory
- .. is up one directory
- . is current directory
Help and manual information
- Use command man to see the manual for the command.
- Use help to see a list of shell commands
- Some commands will show hekp if command is missing required parameter.
- Some commands will show help with --help option.
CLI text editors
- Text editor vi and vim
- Line text editor ed
- Nan's ANOther editor
CLI display a text file
- Concatenate file
- man cat
- cat file_name.txt
Clear the CLI display or clear Terminal window.
MagPi magazine is a free download.
- Issue 54,
Page 38: Switch to the Command Line
List of Linux commands from the MUFIC_IT_2008 Group.
Project 19: Create Python 3 Hello World Program
Python 3
is a programming language that is part of the standard install of the Raspbian overtiring system.
The below steps show how to create a Python 3 program to print Hello World.
- Start Python 3(IDLE).
- In the PIXEL Desktop GUI open the top left Application Menu and select Programming, Python 3(IDLE).
- Start the Python editor
- In the Python 3.4.2 Shell window select File, New File.
- Enter the Python programming statement
- In the editor untiled window type
- Make sure the enter key was typed last.
- In the editor untiled window press the keyboard Enter key.
- Save the Python program as hello_world.py
- In the editor untiled window select Save As...
- Enter file name hello_world.py
- Run the Python program
- In the editor hello_world.py window select Run, Run Module
- The output of the Python program is displayed in the Shell window.
- Back in the Python 3.4.2 Shell window the message Hello World is displayed.
- Exit Python Shell
- In the Python 3.4.2 Shell select File, Exit
Run the Python 3 hello_world.py program in the CLI.
- Open Terminal window.
- To run the Python 3 program enter the below command in the same directory as the hello_world.py file.
- The output Hello World is displayed on the next line.
For help on python3 in CLI enter.
Start the Python 3 hello_world.py program in PIXEL Desktop File Manager.
- Open File Manager window.
- Find the Python hello_world.py file and double click on it.
- In the Python editor window select Run, Run Module.
- The Python 3.4.2 Shell window is opened and the message Hello World is displayed.
The file extension .py tells the RPi to use Python 3 to open the hello_world.py file.
To learn Python
If you have never programmed, check out
Project 20: Monitor Display Resolution
Use a command in the CLI to show the monitor
display resolution.
- In CLI enter the command
- For help
The HDMI monitor needs to be on before turning the RPi in order to use the HDMI fill display resolution.
Other wise, the HDMI resolution will be at 4:3 @ 640x480.
Project 21: Memory Free
There are several types of memory in the RPi. The computer board
RAM memory,
micro-SD card memory and
USB flash memory devices.
- Memory free on micro-SD card with the operating system.
- In the CLI use the disk free command.
- Memory free on USB memory devices.
- In the PIXEL Desktop File Manager select the root directory of the USB memory device.
- Right click, select Properties
- In the File Properties window the size of the files on the disk is shown.
- In the CLI use disk free command with the mounted USB path.
- df -h /media/pi/USB_name
- man df
- Memory free on RAM used by the operating system and software programs.
- In the PIXEL Desktop GUI open the top left Application Menu and select Accessories, Task Manager.
- Memory size and usage is in the top of the Task Manager window.
- In the CLI use free command.
Different version of RPi boards have different sized of RAM.
A summary table of the different board RAM sizes is at
Raspberry Pi
Project 22: Stop or Kill an Unresponsive Program
Sometime a program can be unresponsive and you can not control it, stop it or close it.
To stop or kill a unresponsive program.
- In the PIXEL Desktop GUI open the top left Application Menu and select Accessories, Task Manager.
- Task Manager right click on the program you want to stop.
- In the pull down menu select Stop or Kill .
Project 23: Show RPi CPU Temperature
The RPi monitors the
CPU
temperature.
When the temperature rises high a thermometer is shown on PIXEL Desktop in the upper right corner.
When my RPi CPU temperature is 80.6 C the thermometer is shown on the PIXEL Desktop.
Use heat sinks on the CPU and memory
IC
to help reduct the IC temperature.
The RPi P3 Model B CPU with heat sink and case cover off with room temperature of 21.0 C.
- The CPU temperature 47.2 C
- 0% CPU usage.
- CPU clock frequency is 600 MHz.
- Memory 96 MB of 925 MB used.
- PIXEL Desktop thermometer is not visible.
- The CPU temperature 80.6 C
- 86% CPU usage.
- CPU clock frequency is 1200 MHz.
- Memory 267 MB of 925 MB used.
- PIXEL Desktop thermometer is visible.
To show RPi CPU temperature.
- In the CLI enter the command
- /opt/vc/bin/vcgencmd measure_temp
Raspberry Pi Cooling
Project 24: Show RPi CPU Frequency
The RPi monitors the
CPU
clock frequency.
The higher the CPU clock the faster the CPU runs and quicker the software runs.
The RPi P3 Model B CPU clock frequency at 0% CPU usage is 600 MHz.
The RPi P3 Model B CPU clock frequency at 85% CPU usage is 1200 MHz.
To show RPi CPU clock frequency.
- In the CLI enter the command
- sudo cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
Project 25: Install VLC Media Player
VLC media player
is the VideoLAN project's media player. It plays MPEG, MPEG-2, MPEG-4,
DivX, MOV, WMV, QuickTime, WebM, FLAC, MP3, Ogg/Vorbis files, DVDs, VCDs,
podcasts, and multimedia streams from various network sources.
VLC can also be used as a streaming server that duplicates the stream
it reads and multicasts them through the network to other clients, or
serves them through HTTP.
VLC has support for on-the-fly transcoding of audio and video formats,
either for broadcasting purposes or for movie format transformations.
Support for most output methods is provided by this package, but
features can be added by installing additional plugins
(vlc-plugin-fluidsynth, vlc-plugin-jack, vlc-plugin-notify,
vlc-plugin-samba, vlc-plugin-sdl, vlc-plugin-svg, vlc-plugin-zvbi).
The below installation uses the PIXEL Desktop GUI.
- In the PIXEL Desktop GUI open the top left Application Menu and select Preferences, Add / Remove Software.
- In the Add / Remove Software window search for vlc.
- Check on vlc and plug-ins boxes to select them.
- vlc
- vlc-nox
- vlc-plugin-fluidsynth
- plc-plugin-jack
- plc-plugin-notify
- plc-plugin-samba
- plc-plugin-sdl
- plc-plugin-svg
- plc-plugin-vlsub
- plc-plugin-zvbi
- Click on Apply button to install.
- Reboot
To open VLC.
- In the PIXEL Desktop GUI open the top left Application Menu and select Sound & Video, VLC.
VideoLAN VLC media player website.
Project 26: Get and Set Date and Time
The RPi will automatically set the date and time if the RPi is connected to the Internet.
If no Internet connect durning power-on you can set the date and time in the CLI as shown below.
The RPi does not have a battery clock circuit keeping time when it is turned off.
Get date and time.
- In the CLI enter the date command
Project 27: Change the PIXEL Desktop Wallpaper
PIXEL Desktop
wallpaper
is the image in the background of the PIXEL Desktop.
The RPi has a select of different images that can be used for wallpaper.
Get date and time.
- In the PIXEL Desktop GUI open the top left Application Menu and select Preferences, Appearance Settings, PIXEL Desktop, Picture file folder.
- Select the image to be used for the PIXEL Desktop wallpaper.
Project 28: RPi Portable Battery Operation
The RPi power supply requirement is compatible with USB chargers and portable USB power banks. The USB power banks is a battery with electronic circuits to charge a battery operated USB device such as cell phones, tablets, etc. Therefore, the portable USB power bank can be used to power the RPi.
USB power banks output a standard 5 Volts at different current rates. My RPi power supply is rate 5 Volts at 2.5 Amperes. Therefore, I use a 2.5 Amperes USB power bank.
USB power banks have different storage capacity. Storage capacity is typically rated in mAh (mill Ampere hours). The large the mAh rating, the larger the storage capacity, the longer the RPi will operate from the USB power bank.
I use a
HyperGear Dual USB Power Bank Model #13460
with dual 2.5 A and 2.1 A outputs. The Power Bank lithium-ion batter capacity is 16,000 mAh. A micro USB cable is needed to connect the Power Bank to the RPi.
If the RPi is running 2,000 mA, I hope to operate the RPi for about eight hours, almost a fill day with the Power Bank. A future project is to bench test the performance of the HyperGear Dual USB Power Bank operating time with the RPi.
The HyperGear Dual USB Power Bank was on sale for $17.99 at Fry's Electronics.
Project 29: Copy and Past Between Chromium Web Browser and Terminal CLI
There are some RPi operations that can only be done in the CLI.
If you are follow instructions using the CLI it is easy to copy commands from the instructions like web pages or other electronic documentation and past those commands into the Terminal CLI to run them.
Terminal provides a CLI in a PIXEL Desktop window that supports mouse copy and past operations.
As a result, The mouse can be used to copy text in the
Chromium Web Browser (like CLI commands) and then paste the text into the Terminal window to be run.
Thus, saving typing the command in the Terminal CLI and avoiding typing errors.
For example,
- Us the RPi Chromium Web Browser to display this web page.
- In Chromium use the mouse to select a command from one of the projects.
- To copy the text, right click on the selected text and select Copy from the pop up menu.
- To past the text, right click on the Terminal window.
- In the pop up menu select Paste and the text will be pasted at the end of the command line.
- Push the keyboard Enter (Return) key to execute the copied text (command) in the CLI of Terminal window.
Project 30: Save Terminal CLI Text
Terminal does not have a save to file function. But, you can select CLI Termain text with the mouse, copy this text and past the text into Text Editor to be save as a .txt text file.
- In Terminal select the text with the mouse.
- Right click on the text.
- Select Copy from the pop up menu.
- In Text Editor (Accessories, Text Editor) right click on the editor window.
- Select Paste from the pop up menu.
- In the Text Editor File menu select Save As...
- In the Save As window select the directory location and create the file name.
- Make sure the file name ends with .txt so the you can double click on the file name and it will automatically opened.
Project 31: Get the Raspberry Pi Weekly Newsletter
Sign up for the free
Raspberry Pi Foundation
Raspberry Pi Weekly newsletter at
Subscribe web page.
View the Raspberry Pi Weekly
archive.
Project 32: Learn About RPi & Linux From Magazines
The MagPi magazine is the official Raspberry Pi magazine.
- MagPi magazine is a
free download.
- Issue 55,
Page 40: How to Back Up Your Raspberry Pi
- Issue 54,
Page 38: Switch to the Command Line
Project 33: Watch Raspberry Pi Videos
Raspberry Pi Internet videos are located at
YouTube and
Vimeo.
- Old Element14 videos use older RPi computer boards (Generation 1 Model B) and software. But, they are still worth watching.
Project 34: Join the Raspberry Pi Foundation Forum
The
Raspberry Pi Foundation forum
is a great place to search for RPi information and answers to questions.
Project 35: Get RPi P3 Model B Specifications
The
Wikipedia Raspberry Pi web page has a specifications table comparing the different series and models of RPis.
RPi B+ GPIO pinout diagram and RPi photo with callouts is in
the Element14 article
Adding a Shutdown Button to the Raspberry Pi B+
The B+ GPIO pinout is the same as P3 Model B.
The B+ photo is similar to the P3 Model B, but missing the WiFi ant, etc.
The
Raspberry Pi 3 Model B Frequently Asked Questions (FAQs)
- The new Raspberry Pi 3 supports BLE (Bluetooth Low Energy 4.1) and Wi-Fi 802.11 b/g/n.
- The Raspberry Pi 3 uses the latest BRCM2837 processor, containing a quad 64 bit A53 processor running at 1.2GHz. The processor instruction set is compatible with the ARMv8-A architecture which includes backwards compatibility with the previous ARMv7-A architecture. The Raspbian distribution will only support ARMv7-A instruction set but other distributions will be able to take further advantage of the ARMv8-A instructions and 64 bit support.
- Micro-SD cards up to 64GB have been tested with the new Raspberry Pi 3 board.
- Element14 recommends using the new official 5.1V, 2.5A Raspberry Pi power supply available from element14. This power supply will enable users to power their Pi and other accessories from one power source, thus maximising the benefits of the Pi 3’s improved power management capabilities.
-
Raspberry Pi 3 Model B Technical Specifications
-
Raspberry Pi 3, Pi 2, B+, A+ Comparison Chart
-
Raspberry Pi 3 Model B GPIO 40 Pin Block Pinout
-
A Comprehensive Raspberry Pi 3 Benchmark
Project 36: Learn About the Raspberry Pi From Books
The Raspberry Pi printed books that I have used.
Free online Raspberry Pi PDF books.
Project 37: Learn About the Raspberry Pi From Tutorials, Workshops & Classes
The Raspberry Pi online tutorials, workshops and classes.
- SEA-PAC Raspberry Pi Workshop by Steve Aberle WA7PTM
Project 38: Install ImageJ, An Image Processing & Analysis Program
ImageJ
is an image processing and analysis program inspired by
NIH Image.
ImageJ can display, edit, analyze, process, save and print 8-bit, 16-bit and 32-bit images.
ImageJ can read many image formats including TIFF, GIF, JPEG, BMP, DICOM, FITS and "raw".
ImageJ supports "stacks", a series of images that share a single window.
ImageJ can calculate area and pixel value statistics of user-defined selections.
ImageJ can measure distances and angles. It can create density histograms and line profile plots.
ImageJ supports standard image processing functions such as contrast manipulation, sharpening,
smoothing, edge detection and median filtering.
Spatial calibration is available to provide real world dimensional measurements in units
such as millimeters. Density or gray scale calibration is also available.
ImageJ is developed by Wayne Rasband (wayne@codon.nih.gov), is at the Research Services
Branch, National Institute of Mental Health, Bethesda, Maryland, USA.
The below installation uses the PIXEL Desktop GUI.
- In the PIXEL Desktop GUI open the top left Application Menu and select Preferences, Add / Remove Software.
- In the Add / Remove Software window search for ImageJ.
- Check on ImageJ box to select it.
- Click on Apply button to install ImageJ.
To open ImageJ.
- In the PIXEL Desktop GUI open the top left Application Menu and select Graphics, ImageJ.
Additional information is at /usr/share/doc/imagej.
Project 39: Learn About the Raspberry Pi Foundation
Raspberry Pi Foundation created the Raspberry Pi computers and a great website with many resources to learn how to use a RPi.
Links
Project 40: Install Audacity, Audio Editor Program
Audacity
is a multi-track audio editor for Linux/Unix, MacOS and Windows. It is designed for easy recording, playing and editing of digital audio. Audacity features digital effects and spectrum analysis tools. Editing is very fast and provides unlimited undo/redo.
Supported file formats include Ogg Vorbis, MP2, MP3, WAV, AIFF, and AU.
The below installation uses the PIXEL Desktop GUI.
- In the PIXEL Desktop GUI open the top left Application Menu and select Preferences, Add / Remove Software.
- In the Add / Remove Software window search for Audacity.
- Check on fast, cross-platform audio editor box to select it.
- Check on fast, cross-platform audio editor (data) box to select it.
- Check on English documentation from the Debian Edu project box to select it.
- Check on audio analysis and feature extraction plugins (SDK) box to select it.
- Click on Apply button to install Audacity.
To open Audacity.
- In the PIXEL Desktop GUI open the top left Application Menu and select Sound & Video, Audacity.
Audacity website
Audacity tutorial
Additional information is at
- /usr/share/doc/audacity
- /usr/share/doc/audacity-data
Project 41: Install Stellarium, A 3D Photo-Realistic Sky Chart Program
Stellarium
renders 3D photo-realistic skies in real-time. With Stellarium, you really see what you can see with your eyes, binoculars or a small telescope.
Some features:
- Default star catalogue with over 600 thousand stars,
- Information about the brightest stars (spectral type, distance, etc.),
- Downloadable star catalogue extensions, for up to 210 million stars,
- All New General Catalogue (NGC) objects,
- Images of almost all Messier objects and the Milky Way,
- Real time positions of the planets and their satellites,
- 13 different cultures with their constellations,
- Artistic illustrations of the 88 Western constellations,
- Very realistic atmosphere, sunrise and sunset,
- 7 panoramic landscapes (more can be made or downloaded from the website),
- Scripting with ECMAScript,
- Plug-in support: Stellarium comes with 8 plug-ins by default, including:
- Artificial satellites plug-in (updated from an on-line TLE database),
- Ocular simulation plug-in (shows how objects look like in a given ocular),
- Solar System editor plug-in (imports comet and asteroid data from the MPC),
- Telescope control plug-in (Meade LX200 and Celestron NexStar compatible).
Stellarium should not be used for very high accurate calculation or ephemerids like eclipse predictions. However, it is the ideal program to prepare an observation evening with naked eye, binocular, or small telescope.
The Stellarium data files package contains data files required by Stellarium. They include textures, star catalogues and translations.
The below installation uses the PIXEL Desktop GUI.
- In the PIXEL Desktop GUI open the top left Application Menu and select Preferences, Add / Remove Software.
- In the Add / Remove Software window search for Stellarium.
- Check on stellarium and stellarium data file boxes to select them.
- Click on Apply button to install ImageJ.
To open Stellarium.
- In the PIXEL Desktop GUI open the top left Application Menu and select Education, Stellarium.
Stellarium website
Additional information is at
- /usr/share/doc/stellarium
- /usr/share/doc/stellarium-data
Project 42: Shutdown a RPi
It is a good practice to correctly turn off a RPi.
The method to turn-off a RPi depends upon if the PIXEL Desktop GUI is being used.
Using PIXEL Desktop GUI.
- In the PIXEL Desktop GUI open the top left Application Menu and select Shutdown.
- In the Shutdown options window, select Shutdown.
- The PIXEL Desktop GUI will close.
- The RPi screen goes blank and now it is safe to turn off the power source to the RPi.
Not using PIXEL Desktop GUI method 1.
- In the CLI enter
- The CLI shows activity closing the Raspbian operating system.
- The RPi screen goes blank and now it is safe to turn off the power source to the RPi.
- Also, check the RPi green LED for not activity on the micro SD card.
Not using PIXEL Desktop GUI method 2.
- In the CLI enter
- The CLI shows activity closing the Raspbian operating system.
- The RPi screen goes blank and now it is safe to turn off the power source to the RPi.
- Also, check the RPi green LED for not activity on the micro SD card.
Other references:
Project 43: Change the HDMI Display Resolution after Power-On
Small HDMI displays may be difficult to use at full 1080 resolution.
In PIXEL Desktop GUI the display resolution can be changed after power-on.
Using the PIXEL Desktop GUI.
- In the PIXEL Desktop GUI open the top left Application Menu and select Preferences, Raspberry Pi. Configuration, Resolution.
- In the Set Resolution window, select the new resolution setting and click OK.
- The RPi needs to power-cycle in order for the new HDMI resolution setting to take effect.
Project 44: Benchmark the RPi P3 Model B
Power-on time to PIXEL Desktop GUI.
Using 32 GB SD, show PIXEL screen when starting Desktop GUI and
HDMI TV monitor at 16:10, 1680x1050 @ 60 Hz progressive.
- 72 seconds with RPi P1 Model B
- 29 seconds with RPi P3 Model B
Element14 RPi benchmark tests.
During the Element14 launch video the RPi 3 Model B core performance was reported to be 10X faster than the first RPi.
Project 45: Help, Manuals, etc. On The RPi
The RPi has several ways to get help off-line.
In the PIXEL Desktop GUI.
- In the PIXEL Desktop GUI open the top left Application Menu and select Help.
- Debian Reference (Off-line help from /usr/share/debian-reference/index.html)
- Raspberry Pi Help (On-line help from https://www.raspberrypi.org/help/)
In the CLI use the following commands and options. Different commands support different types of help.
- Help command:
- help
- help help
- help <command>
- Manual command:
- man
- man man
- man <command>
- Information command:
- info
- info -h
- info <command>
In the CLI some commands support the following options.
- Command option <command> -h
- Command option <command> --help
Project 46: Environment Variables
Environment variables contain a variety of information that range from the user logged on to the search path used to locate commands.
In CLI use the following commands to show the value of the environment variables.
- Show all environment variables values.
- Show one environment variable value.
Examples of environment variables.
- USER: User name, default is pi
- HOME: Home directory, default is /home/pi
- PATH: Search path used to locate commands.
- In a future project we will create a new command and add its location to the PATH variable.
Project 47: Install X Applications
PIXEL
Desktop GUI is based on
X Window System.
X Window System is also called X11 Window System.
X applications run on the PIXEL Desktop GUI.
This package provides a miscellaneous assortment of X applications that ship with the X Window System, including:
- atobm, bitmap, and bmtoa, tools for manipulating bitmap images;
- ico, a demo program animating polyhedrons;
- oclock and xclock, graphical clocks;
- rendercheck, a program to test render extension implementations;
- transset, a tool to set opacity property on a window;
- xbiff, a tool which tells you when you have new email;
- xcalc, a scientific calculator desktop accessory;
- xclipboard, a tool to manage cut-and-pasted text selections;
- xconsole, which monitors system console messages;
- xcursorgen, a tool for creating X cursor files from PNGs;
- xditview, a viewer for ditroff output;
- xedit, a simple text editor for X;
- xeyes, a demo program in which a pair of eyes track the pointer;
- xgc, a graphics demo;
- xload, a monitor for the system load average;
- xlogo, a demo program that displays the X logo;
- xmag, which magnifies parts of the X screen;
- xman, a manual page browser;
- xmore, a text pager;
- xwd, a utility for taking window dumps ("screenshots") of the X session;
- xwud, a viewer for window dumps created by xwd;
- Xmark, x11perf, and x11perfcomp, tools for benchmarking graphical operations
Install X Applications.
- In the PIXEL Desktop GUI open the top left Application Menu and select Preferences, Add / Remove Software.
- In the Add / Remove Software window search for wxd.
- Check on X applications file boxe to select them.
- Click on Apply button to install X applications.
Example using screenshot (screen dump). The file extension needs to be <.wxd>.
- xwd -out <file_name>.wxd
- Click on window to capture it.
To view the screenshot (screen dump) <file_name>.wxd.
X Window System user's guide : for X11 R3 and R4 of the X Window System
Manuals information.
In project 49 the screenshot .wxd file is converted to a a more common .png file.
Additional information is at /usr/share/doc/x11-apps
Project 48: File Names & Extensions
RPi
computer file
names are case sensitive.
- RPi files "test" and file "Test" are two different files whereas in a Microsoft Windows computer they are the same file.
RPi hidden files start with a period (.).
- To see hidden files use the CLI command
File name general guidelines.
- Use the following characters
- a through z
- A through Z
- 0, 1 through 9 and
- the _ character
- Avoid using the space character in the file name because it will cause you more work when using the CLI.
File name general guidelines.
- Use
filename extensions
whenever possible.
- Filename extensions help you remember the file type.
- .txt is a text file.
- .py is a Python program file.
- .html is a Internet Hypertext markup language file.
- Filename extensions allow files to be automatically open by the correct program in PIXEL Desktop GUI.
- The ls command uses file extensions to display the file name in different colors depending on the file type.
File extensions tables.
Project 49: Install ImageMagick
ImageMagick
is a software suite to create, edit, and compose bitmap images.
It can read, convert and write images in a variety of formats (over 100)
including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript,
SVG, and TIFF. Use ImageMagick to translate, flip, mirror, rotate, scale,
shear and transform images, adjust image colors, apply various special
effects, or draw text, lines, polygons, ellipses and Bézier curves.
All manipulations can be achieved through shell commands as well as
through an X11 graphical interface (display).
This package include links to quantum depth specific binaries and
manual pages.
The below installation uses the PIXEL Desktop GUI.
- In the PIXEL Desktop GUI open the top left Application Menu and select Preferences, Add / Remove Software.
- In the Add / Remove Software window search for ImageMagick.
- Check on ImageMagick files (binaries, quantum depth Q16 & infrastructure) boxes to select them.
- Click on Apply button to install ImageMagick.
To open ImageMagick.
- In the CLI enter the command.
- display &
- Click on the ImageMagick logo to see the ImageMagick menu.
In project 47 the screenshot was saved as a .wxd file. Below the convert command is used to change it to a more common .png file.
- In the CLI enter the command.
- convert <file_name>.wxd <file_name>.png
ImageMagick website
Additional information is at
- /usr/share/doc/imagemagick
- /usr/share/doc/imagemagick-6.q16
- /usr/share/doc/imagemagick-common
Project 50: Install XFig
XFig
is a menu-driven tool that allows the user to draw and manipulate objects interactively in an X window. The resulting pictures can be saved, printed on postscript printers, or converted to a variety of other formats (e.g. to allow inclusion in LaTeX documents or web pages) using the transfig program.
This package contains the xfig program itself.
You should think about installing the transfig package to export the graphics to several common formats. You should also think about installing xfig-doc, which contains the documentation and xfig-libs, which contains several clip art libraries.
The below installation uses the PIXEL Desktop GUI.
- In the PIXEL Desktop GUI open the top left Application Menu and select Preferences, Add / Remove Software.
- In the Add / Remove Software window search for xfig.
- Check on all four xfig files boxes to select them.
- Click on Apply button to install xfig.
To open XFig.
- In the PIXEL Desktop GUI open the top left Application Menu and select Graphics, xfig.
XFig website
Additional information is at
- /usr/share/doc/xfig
- /usr/share/doc/xfig-doc
- /usr/share/doc/xfig-libs
Project 51: Bash Shell Job Control
The RPi default shell is the
bash shell. The bash shell is used at the CLI (command line interface)
to work with the RPi
Linux kernel
and other programs on the RPi.
To show the shell being used by the RPi use the below command.
Job control
is managing how programs are run in the foreground or background, halted and stopped (killed).
The benefit of job control is a local or remote terminal is used to manage several program jobs at the same time. This will be very important capability when controlling the RPi by a remote computer using
Secure Shell (SSH) and the RPi has no keyboard, mouse or display (headless operation).
Job control Ctrl-key commands:
- Ctrl-c Kill the current process/job.
- If a job is running, Ctrl-c stops the job and starts an new command line in the Terminal.
- Ctrl-d Log out from the current Terminal. If using PIXEL Desktop the Terminal window will close.
- Ctrl-z Send current process/job to the background and the job is halted.
Job control commands:
- Run a job in the background.
- Add a & to the end of a program command. This will run the program in the background.
- The job is in background is started if it is not running.
- Move job in the background to foreground and make sure it is running.
- List jobs with their status (running or stopped).
- Processes status of the jobs.
- Kill, terminate a job using the PID from ps command.
The below job control examples use the Terminal program in the PIXEL Desktop GUI and the
xclock program from project 47. (man xclock) By using the clock with seconds hand it is easy to see when clock is running or stopped.
The clock takes about 10 seconds to start up and the clock will report some errors that does not seem to affect its operation.
Example 1, shows the clock as a foreground job that stops the Terminal from being used for other jobs. Ctrl-c kills the job and the Terminal is back to normal operation.
Terminal | Clock | Comments |
Command prompt | | |
xclock -analog -update 1 | | Start the clock |
No command prompt | Clock running in the foreground | |
Ctrl-c | Clock is killed | Ctrl-c kills the current job |
Command prompt | | |
Example 2, shows starting the clock with background & option.
The fg command moves the clock to the foreground job resulting in locking the Terminal from being used for other jobs. Ctrl-c kills the job and the Terminal is back to normal operation.
Terminal | Clock | Comments |
Command prompt | | |
xclock -analog -update 1 & | | Start the clock |
Command prompt | Clock running in the background | |
Ctrl-c | Clock running in the background | Ctrl-c has no effect on the background job |
fg | Clock running in the foreground | fg moves the job to the foreground |
Ctrl-c | Clock is killed | Ctrl-c kills the current job |
Command prompt | | |
Example 3, shows the foreground job being halted and being put in the background using Ctrl-z.
Use the kill command to tell the clock job.
Terminal | Clock | Comments |
Command prompt | | |
xclock -analog -update 1 | | Start the clock |
No command prompt | Clock running in the foreground | |
Ctrl-z | Clock is stopped ticking | Ctrl-z halts clock & puts clock in background |
Command prompt | | |
fg | Clock running in the foreground | fb starts the clock & moves it to foreground
|
Crtl-z | Clock is stopped in background | |
bg | Clock is running in background | |
ps | Clock is running in background | Get the PID number of clock |
kill PID_number | Clock is killed | Kill job with PID number |
Command prompt | | |
Project 52: Install Ardour, Digital Audio Workstation
Ardour
is a multichannel hard disk recorder (HDR) and digital audio workstation (DAW).
It can be used to control, record, edit and run complex audio setups.
Ardour supports pro-audio interfaces through the ALSA project, which provides high quality,
well designed device drivers and API's for audio I/O under Linux. Any interface supported
by ALSA can be used with Ardour. This includes the all-digital 26 channel RME Hammerfall,
the Midiman Delta 1010 and many others.
Ardour has support for 24 bit samples using floating point internally, non-linear editing
with unlimited undo, a user-configurable mixer, MTC master/slave capabilities, MIDI hardware
control surface compatibility.
It supports MIDI Machine Control, and so can be controlled from any MMC controller and many
modern digital mixers.
Ardour contains a powerful multitrack audio editor/arranger that is completely non-destructive
and capable of all standard non-linear editing operations (insert, replace, delete, move, trim,
select, cut/copy/paste). The editor has unlimited undo/redo capabilities and can save independent
"versions" of a track or an entire piece
Ardour's editor supports the community-developed LADSPA plugin standard.
Arbitrary chains of
plugins can be attached to any portion of a track. Every mixer strip can have any number of
inputs and outputs, not just mono, stereo or 5.1. An N-way panner is included, with support
for various panning models. Pre- and post-fader sends exist, each with their own gain and
pan controls. Every mixer strip acts as its own bus, and thus the bus count in Ardour is
unlimited. You can submix any number of strips into another strip.
Ardour's channel capacity is limited only by the number on your audio interface and the
ability of your disk subsystem to stream the data back and forth.
JACK (the JACK Audio Connection Kit) is used for all audio I/O, permitting data to be
exchanged in perfect samplesync with other applications and/or hardware audio interfaces.
Ardour is sample rate and size neutral - any hardware formats from 8 to 32 bits, and
rates from 8kHz to 192kHz. Internal processing in 32/64 bit IEEE floating point format.
Further information can be found at .
The below installation uses the PIXEL Desktop GUI.
- In the PIXEL Desktop GUI open the top left Application Menu and select Preferences, Add / Remove Software.
- In the Add / Remove Software window search for ardour3.
- Check on the ardour3 files box to select it.
- Click on Apply button to install ardour3.
To open Ardour 3.
- In the PIXEL Desktop GUI open the top left Application Menu and select Sound & Video, Ardour3.
Ardour version is 3-3.403~dfsg-3.
Ardour website
Additional information is at /usr/share/doc/ardour3
Project 53: RPi Zero W: Assemble the Computer
RPi Zero W is a very low cost RPi with
WiFi
with reduced performance and functionality as compared to the RPi P3 Model B.
YouTube
Get components and assemble the Raspberry Pi Zero W computer.
- Get Components (total cost ~$69)
- At Amazon is the
CanaKit Raspberry Pi Zero W (Wireless) Starter Kit with Official Case ($39.99) include
- Raspberry Pi Zero W computer board
- 5 V, 1 A DC power supply
- Official white case for the Raspberry Pi Zero W computer board. The case has three different covers.
- 8 GB MicroSD Card (Class 10) - Pre-loaded with NOOBS
- USB OTG Cable
- Mini HDMI Adapter
- Goodwill is a good source of used HDMI displays, keyboards, mice, etc.
- Used ($19.99) TV with HDMI input. (TV HDMI support audio)
- The RPi Zero W does not have analog audio output connector (head phones jack) like the RPi P3 Model 3.
- Use a HDMI display that supports audio.
- Or get an USB audio device.
- Used ($1.99) HDMI full size cable
- Used ($6.99 USB wireless keyboard/touch pad
- Assemble the RPi computer
- Plug the NOOBS micro-SD card into the computer board.
- Install RPi board in the case.
- Plug the HDMI cable into the HDMI display and into the HDMI adapter to the computer board.
- Plug the USB wireless keyboard/touch pad receiver into the USB adapter cable attached to the computer board.
- Do not plug the power supply in yet. It is important that the HDMI display is turned on and is set for the correct input before turning on the RPi.
First power on and setting up the operating system.
- First power on of the RPi
- Turn on the
HDMI display.
- If needed select HDMI input on the HDMI TV.
- The RPi checks the supported resolution of the HDMI display at power on. If the display is not on at RPi power on, the RPi will default to the lowest display resolution of 640 x 480.
- Plug in the RPi power supply.
- NOOBS will start the install process for Raspbain. No Internet connection is needed.
- The installation process takes over 1/2 hour.
- Set RPi Configuration for the operating system
- In the PIXEL Desktop GUI open the top left Application Menu and select Preferences, Raspberry Pi Configuration, Localisation tab.
- Set locale
- Set timezone
- Set keyboard
- Set WiFi country
- In the PIXEL Desktop GUI open the top left Application Menu and select Preferences, Raspberry Pi Configuration, System tab.
- Change the default password (raspberry)
- Set WiFi password if used
- Shutdown Procedure
- It is important to safety shutdown all programs and then shutdown the operating system before turning off the power to the RPi.
- In the PIXEL Desktop GUI select Shutdown
- After the display goes blank, turn off the RPi and HDMI display.
RPi Zero W computer performance comparison.
Power-on time to the PIXEL Desktop GUI.
- 29 seconds with RPi P3 Model B
- 60 seconds with RPi Zero W
- 72 seconds with RPi P1 Model B
After the software instal it is a good idea to update the RPi.
See
Project 4: Update RPi Software and GPU Firmware.
To Do:
- I have not been successful in being able to use the RPi P3 Model B micro SD card in the RPi Zero W.
Project 54: Password Security
The default RPi user name is pi and it's default
password
is raspberry.
It is important to change the default password when using the RPi a network to prevent attacks by others against the RPi.
See
password strength
for more information.
The below password change process uses the PIXEL Desktop GUI.
- In the PIXEL Desktop GUI open the top left Application Menu and select Preferences, Raspberry Pi Configuration.
- In the Raspberry Pi Configuration window select System tab, Change Password... button.
- Fill in the old password raspberry and your new password.
- Click on OK
Project 55: Bash Script: Update/Upgrade RPi Software & Firmware
The default Raspbian shell is the
bash shell.
The bash shell is used in the command line interface (CLI)
to interface with the RPi
Linux kernel
and with RPi programs.
The CLI is used when the PIXEL Desktop GUI is not being used.
The CLI is used in the PIXEL Desktop GUI Terminal program.
The benefit of using the PIXEL Terminal is mouse cut and past editing is supported.
For more bash shell projects are at:
The bash shell allows creating scripts to make using the CLI easier.
The below shell script, updateRPi, was created to update and upgrade the RPi software and firmware.
Bash commands explaination:
- The
shebang (#!) determines which Linux interpreter shell to be used.
In this example the bash shell is used to interpreter the script file.
- Comment line
- Echo text to terminal
- Echo text to a log file updatelog.txt (append text to the exiting file)
- echo <text> >>updatelog.txt
- Date and time text is appended to the updatelog.txt file.
The software and firmware update/upgrade commands are described in
Project 4: Update RPi Software and GPU Firmware
Bash script file updateRPi
(updateRPi.txt file for easy download)
#!/bin/bash
#
# update RPi software and firmware
# David Haworth, WA9ONY
#
echo ---updateRPi bash command >>updatelog.txt
date >>updatelog.txt
echo >>updatelog.txt
echo ---update software >>updatelog.txt
echo ---update software
sudo apt-get update >>updatelog.txt
echo >>updatelog.txt
echo ---upgrade >>updatelog.txt
echo ---upgrade software
sudo apt-get upgrade -y >>updatelog.txt
echo >>updatelog.txt
echo ---dist-upgrade >>updatelog.txt
echo ---dist-upgrade software
sudo apt-get dist-upgrade -y >>updatelog.txt
echo >>updatelog.txt
echo ---firmware_update >>updatelog.txt
echo ---rpi-update >>updatelog.txt
echo ---update firware
sudo rpi-update >>updatelog.txt
echo >>updatelog.txt
date >>updatelog.txt
echo ---updateRPi completed >>updatelog.txt
echo ---updateRPi completed
echo Please reboot RPi
Creating a bash shell script requires creating the above updateRPi text file with the bash shell commands and making the updateRPi file an executable file.
- In CLI change the working directory to the home directory.
- Use a text editor to create the shell commands file and save it as updateRPi in the pi directory.
- I use the PIXEL Desktop GUI Text Editor
- Copy the past the above updateRPi.txt text into your text editor.
- I do not use any
file extension.
- Some examples use .sh file extension, but the .sh file extension is not required.
- Make updateRPi an execuitable file.
- Run the updateRPi bash shell.
The Terminal window example of using updateRPi.
The updateRPi script create a updatelog.txt log file.
- The below updatelog.txt file shows no updates and no upgrades were needed.
---updateRPi bash command
Mon Apr 10 10:31:45 PDT 2017
---update software
Hit http://archive.raspberrypi.org jessie InRelease
Hit http://mirrordirector.raspbian.org jessie InRelease
Hit http://mirrordirector.raspbian.org jessie/main armhf Packages
Hit http://archive.raspberrypi.org jessie/main armhf Packages
Hit http://mirrordirector.raspbian.org jessie/contrib armhf Packages
Hit http://mirrordirector.raspbian.org jessie/non-free armhf Packages
Hit http://archive.raspberrypi.org jessie/ui armhf Packages
Hit http://mirrordirector.raspbian.org jessie/rpi armhf Packages
Ign http://archive.raspberrypi.org jessie/main Translation-en_US
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en_US
Ign http://archive.raspberrypi.org jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/contrib Translation-en
Ign http://mirrordirector.raspbian.org jessie/main Translation-en_US
Ign http://archive.raspberrypi.org jessie/ui Translation-en_US
Ign http://mirrordirector.raspbian.org jessie/main Translation-en
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en_US
Ign http://archive.raspberrypi.org jessie/ui Translation-en
Ign http://mirrordirector.raspbian.org jessie/non-free Translation-en
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en_US
Ign http://mirrordirector.raspbian.org jessie/rpi Translation-en
Reading package lists...
---upgrade
Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
libjs-prettify libllvm3.7 libqscintilla2-11 libqscintilla2-l10n libruby1.9.1
libruby1.9.1-dbg libtcl8.5 libtcltk-ruby1.9.1 libtk8.5 ri1.9.1 ruby1.9.1
ruby1.9.1-dev ruby1.9.1-examples ruby1.9.1-full ruby1.9.3 supercollider
supercollider-common supercollider-ide supercollider-language
supercollider-supernova tcl8.5 tk8.5
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
---dist-upgrade
Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
libjs-prettify libllvm3.7 libqscintilla2-11 libqscintilla2-l10n libruby1.9.1
libruby1.9.1-dbg libtcl8.5 libtcltk-ruby1.9.1 libtk8.5 ri1.9.1 ruby1.9.1
ruby1.9.1-dev ruby1.9.1-examples ruby1.9.1-full ruby1.9.3 supercollider
supercollider-common supercollider-ide supercollider-language
supercollider-supernova tcl8.5 tk8.5
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
---firmware_update
---rpi-update
*** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
*** Performing self-update
*** Relaunching after update
*** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
*** Your firmware is already up to date
Mon Apr 10 10:32:13 PDT 2017
---updateRPi completed
Creating bash scripts/commands
Linux
Project 56: Touchscreen Display
The Raspberry Pi 7" Touchscreen Display provides a small, portable computer.
What is needed:
Smarti Pi Touch case for official Raspberry Pi display YouTube installation:
Install touch keyboard:
- In PIXEL Desktop GUI Terminal.
- sudo apt-get update
- sudo apt-get upgrade
- sudo apt-get install matchbox-keyboard
- Reboot
- In PIXEL Desktop GUI Terminal.
Project 57: RPi Zero W: Install Camera
The standard RPi Zero W case supports installing the Pi Camera V2 in the case cover.
The case cover has a hole for the Pi Camera V2 lens.
The standard RPi Zero W case includes three different case covers.
- Solid cover.
- Cover with square slot to access the GPIO.
- Cover to mount the Pi Camera V2 to the inside of the top cover.
- A camera short ribbon cable is include with the standard RPi Zero case.
What is needed:
Installing the Pi Camera V2 in the RPi Zero W case cover:
- Attached the ribbon cable to the camera.
- Pull out the camera connector lock.
- Insert the camera ribbon cable, make sure the ribbon contacts are facing the connector contacts.
- Push in the camera connector lock.
- Attached the ribbon cable to the RPi Zero W board.
- Pull out the RPi Zero W board camera connector lock.
- Insert the camera ribbon cable, make sure the ribbon contacts are facing the connector contacts.
- Push in the RPi Zero W board camera connector lock.
- Snap the P1 Camera V2 into the standard RPi Zero case cover that has a hole for the camera lens.
- Make sure the top cover is not up side down.
- Snap the RPi Zero case cover into the case.
Configure the Pi Zero W software to use the camera.
- Power-on the RPi Zero W.
- In PIXEL Desktop GUI Terminal.
- sudo apt-get update
- sudo apt-get upgrade
- sudo raspi-config
- Power cycle the RPi Zero W
Test the camera.
- In PIXEL Desktop GUI Terminal.
- raspistill -v -o test.jpg
For more details see the older Pi Camera V1 documentation.
Project 58: RPi Zero W: Build a Case Holder
The Pi Camera V2 installed in the standard RPi Zero W case cover faces vertically.
This project builds a case holder with Legos to position the camera horizontal.
What is needed:
Project 59: Install ALSA: Advanced Linux Sound Architecture Player
The ALSA: Advanced Linux Sound Architecture is the Linux framework of sound.
Install ALSA player and utilities. The ALSA utilities are needed for using Software Defined Radio.
The below installation uses the PIXEL Desktop GUI.
- In the PIXEL Desktop GUI open the top left Application Menu and select Preferences, Add / Remove Software.
- In the Add / Remove Software window search for alsa.
- Check on the following box to select them.
- alsa-base
- alsaplayer-alsa
- alsaplayer-common
- alsaplayer-daemon
- alsaplayer-gtk
- alsaplayer-jack
- alsaplayer-text
- alsaplayer-xosd
- alsaplayer-utils
- libalsaplayer
- Click on Apply button to install.
- Reboot
To open Alsaplayer to play a
MP3
audio file:
- In the PIXEL Desktop GUI open the top left Application Menu and select Sound & Video, Alsaplayer.
- In the Alsaplayer click on Playlist window.
- In the Alsaplayer, Playlist window click on Add.
- Select a
MP3 audio file to play.
- In the Alsaplayer click on Play button.
- If no sound, right click on the speaker icon in the upper right corner Desktop menu bar to select analog audio output jack or HDMI display speaker.
Rtl_sdr and aplay help
Project 60: Warning Icons: High Temperature & Under Voltage
Warning icons will display in the upper right corner of the display.
- A CPU temperature warning icon is a red thermometer.
- So far the only time I have seen the temperature warning icon is when I use GNU Radio with a SDR dongle. The temperature was over 80 degrees.
- My RPi P3 Model B has two heat sinks installed on the ICs.
- I am using the standard RPi P3 Model B red and white case with the top cover removed.
- The under voltage warning icon is a yellow lighting bold.
- I have seen the under voltage warning icon several times.
- Most times it occurs when using a in adequate power supply or poor quality USB micro cable.
- Also, long USB micro power supply cables are a common cause of power warning icon.
Under-voltage warnings
Project 61: RPi Portable Battery Operation
RPi battery operation makes the RPi a compact portable Linux computer.
What is needed:
Project 62: IP Address
A key part of networking is the computer's
IP address.
Finding the
Raspberry Pi
IP address.
- In the CLI enter one of the following commands:
- hostname -I
- ifconfig
- traceroute www.google.com
- route
- To fine the IP address of a web site enter:
Finding the
Mac OS X
IP address.
- Start a Terminal window and enter:
Finding the
iPhone or iPad
iOS
IP address.
- Go to Settings, Wi-Fi, select the Wi-Fi access point for IP address.
Finding the
Microsoft Windows
IP address.
- Run the cmd window to enter:
Finding the
Android
IP address.
- Go to Settings, Wi-Fi, Advanced Wi-Fi for IP address.
Fing
Network IP address scanning tool.
Project 63: SSH: Secure Shell Remote Control
SSH provides a secure way to control the RPi by another RPi or computer.
SSH needs to be enable on both computers.
SSH needs the RPi
RPi P3 Model B controlling a RPi Zero W with camera.
In the PIXEL Desktop GUI Terminal enter:
- ssh <user name>@<
IP address >
- ssh pi@<
IP address>
- The default user name is pi if you have not changed it.
- Successful connection requires User password
- The default user password is raspberry if you have not changed it.
Example of taking a RPi Zero W camera picture by remote SSH.
- RPi Zero W IP address is 10.0.0.20
- RPi Zero W user name is pi
- The RPi Zero W command to take a picture is raspistill -v -o test.jpg
- The RPi Zero W command ls show the test.jpg file in the RPi Zero W home directory.
- The RPi Zero W command exit closes the SSH connection. Also, CTRL-D can be used to close the SSH session.
-
pi@raspberrypi:~ $ ssh pi@10.0.0.20
The authenticity of host '10.0.0.20 (10.0.0.20)' can't be established.
ECDSA key fingerprint is d3:cf:59:b4:86:09:08:cc:13:62:2b:28:ae:fd:e1:6e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.0.0.20' (ECDSA) to the list of known hosts.
pi@10.0.0.20's password:
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Apr 14 16:51:30 2017
pi@raspberrypi:~ $ raspistill -v -o test.jpg
raspistill Camera App v1.3.11
Width 3280, Height 2464, quality 85, filename test.jpg
Time delay 5000, Raw no
Thumbnail enabled Yes, width 64, height 48, quality 35
Link to latest frame enabled no
Full resolution preview No
Capture method : Single capture
Preview Yes, Full screen Yes
Preview window 0,0,1024,768
Opacity 255
Sharpness 0, Contrast 0, Brightness 50
Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0
Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'
Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
Rotation 0, hflip No, vflip No
ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000
Camera component done
Encoder component done
Starting component connection stage
Connecting camera preview port to video render.
Connecting camera stills port to encoder input port
Opening output file test.jpg
Enabling encoder output port
Starting capture -1
Finished capture -1
Closing down
Close down completed, all components disconnected, disabled and destroyed
pi@raspberrypi:~ $ ls
Desktop Music python_games test1.jpg test4.jpg Videos
Documents Pictures Templates test2.jpg test5.jpg
Downloads Public test0.jpg test3.jpg test.jpg
pi@raspberrypi:~ $ exit
logout
Connection to 10.0.0.20 closed.
pi@raspberrypi:~ $
For ssh help
Related projects:
Android SSH
Project 64: SSH File Transfer Protocol
In project 63 we saw how to run commands on a remote RPi using SSH.
A picture was taken and the picture file in the remote RPi home directory.
SSH File Transfer Protocol
allows copying the image file to the controlling computer.
SH File Transfer Protocol example:
- The test.jpg image file is copied from the RPi Zero W to the RPi P3 Model B computer.
For sftp help
How To Use SFTP to Securely Transfer Files with a Remote Server
Project 65: RPi Zero W: Portable Headless Camera
This is a RPi Zero W with Pi Camera V2 in a standard RPi Zero W case with Lego blocks holding the case vertical.
The small round camera lens is in the center of the RPi case.
The RPi Zero W is powered with an USB Power Bank that supports 2.5 A.
Another RPi P3 Model B or MacBook remotely controls the RPi Zero W to take pictures and copies the pictures from the RPi Zero W using Wi-Fi and
SSH/
SFTP (SSH File Transfer Protocol).
Hardware:
Software:
- SSH is enabled on all computers.
- RPi Zero W
- Setup for Wi-Fi with keyboard and mouse.
- User name is pi
- Camera is enable in configuration menu.
- RPi 3 Model B has two Terminal windows open.
- Terminal window for SSH to take pictures
- Terminal window for SFTP to copy pictures from RPi Zero W to RPi P3 Model B.
Fing on iPhone is used to determine the RPi Zero W IP address.
- In this example IP address is 10.0.0.20
Terminal Example for SSH connection, taking a photo, list directory and closing the session.
-
pi@raspberrypi:~ $ ssh pi@10.0.0.20
pi@10.0.0.20's password:
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Apr 21 15:15:45 2017 from 10.0.0.9
pi@raspberrypi:~ $ raspistill -v -o test14.jpg
raspistill Camera App v1.3.11
Width 3280, Height 2464, quality 85, filename test14.jpg
Time delay 5000, Raw no
Thumbnail enabled Yes, width 64, height 48, quality 35
Link to latest frame enabled no
Full resolution preview No
Capture method : Single capture
Preview Yes, Full screen Yes
Preview window 0,0,1024,768
Opacity 255
Sharpness 0, Contrast 0, Brightness 50
Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0
Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'
Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
Rotation 0, hflip No, vflip No
ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000
Camera component done
Encoder component done
Starting component connection stage
Connecting camera preview port to video render.
Connecting camera stills port to encoder input port
Opening output file test14.jpg
Enabling encoder output port
Starting capture -1
Finished capture -1
Closing down
Close down completed, all components disconnected, disabled and destroyed
pi@raspberrypi:~ $ ls
Desktop Music python_games test12.jpg test1.jpg test4.jpg Videos
Documents Pictures Templates test13.jpg test2.jpg test5.jpg
Downloads Public test0.jpg test14.jpg test3.jpg test.jpg
pi@raspberrypi:~ $ exit
logout
Connection to 10.0.0.20 closed.
pi@raspberrypi:~ $
Terminal Example for SFTP (SSH File Transfer Protocol) coping the photo from the RPi Zero W.
Project 66: SSH: X11 Forwarding
SSH with -Y option can open a X11 window from the remote RPi on the local RPi.
PIXEL Desktop GUI File Manager is a X11 application called pcmanfm.
X11 forwarding example using File Manager.
The remote RPi File Manager opens in a X window on the local RPi.
- You can navigate the remote RPi /home/pi file system on the local RPi.
- Move files between folders by drag and drop with mouse.
- Drag and drop files between computers does not work.
- Copy and past files work only once, and stopped working.
- Create new X11 windows on the local RPi by opening a remote RPi files that has a X11 applications.
- Right click on an image file (JPG, PNG) and open with Image Viewer creates a X11 window with Image Viewer.
- Right click on a PDF file and open with xpdf creates a X11 window with xpdf.
- Right click on a text file and open with Leafpad creates a X11 window with Leafpad.
How to remote control Raspberry Pi
X11 Forwarding with RPi, PuTTY, and Android by KC9ZYZ
X Window System user's guide : for X11 R3 and R4 of the X Window System
Project 67: Install SoX: Sound eXchange
SoX is the Swiss Army knife of sound processing programs.
SoX is a command line utility that can convert various formats
of computer audio files in to other formats. It can also apply
various effects to these sound files during the conversion.
As an added bonus, SoX can play and record audio files on
several unix-style platforms.
SoX is able to handle formats like Ogg Vorbis, MP3, WAV,
AIFF, VOC, SND, AU, GSM and several more. Any format
support requires at least libsox-fmt-base. Some formats
have their own package e.g. mp3 read and write support
is provided by libsox-fmt-mp3.
SoX supports most common sound architectures i.e. Alsa,
Libao, OSS and Pulse (respectively provided by libsox-fmt-alsa,
libsox-fmt-ao, libsox-fmt-oss and libsox-fmt-pulse).
It also supports LADSPA plugins.
The below installation uses the PIXEL Desktop GUI.
- In the PIXEL Desktop GUI open the top left Application Menu and select Preferences, Add / Remove Software.
- In the Add / Remove Software window search for sox.
- Check on sox and libsox-fmt-all boxes to select them.
- Click on Apply button to install.
- Reboot
SoX
play is used in the
rtl_fm guide.
Project 68: Bash Script: myRPi Information
This myRPi.sh Bash shell script logs a variety of RPi hardware and software information to a myRPiLog.txt file.
- myRPi.sh
- chmod +x myRPi.sh
- Example myRPiLog.txt file of a RPi Zero W.
- The tree diagram in the log file shows correctly in RPi and Mac text editors.
- The tree diagram does not show correctly in web browser.
myRPi.sh example
myRPiLog.txt example from the RPi Zero W.
Creating bash scripts/commands
Linux
Bash scripting YouTube videos.
Android app.
Project 69: Bash: Command-line Completion
When you need help remembering the CLI (command line interface) commands use the PIXEL Desktop GUI Application Menu, Run to list all the commands starting with the first two letters.
When using the CLI (command line interface) type the first two letters of the command and then the TAB key twice. It will take a second or two and list of commands starting with those two letters will be listed.
Command-line Completion example by Wikipedia.
Example: ls TAB-KEY TAB-KEY
Example: up TAB-KEY TAB-KEY
Auto fill example: upt TAB-KEY
Project 70: RPi Zero W: Camera Bash Script
The RPi Zero W with Pi Camera V2.0 is setup for headless (no keyboard and no display) operation.
It runs off a battery for portable operation.
A RPi P3 Model B remotely controls the RPi Zero W with Pi Camera V2.0 by Wi-Fi. Both RPi are connected to the same Wi-Fi router. RPi Zero W IP address is 10.0.0.20.
The RPi Zero W boots up in user pi and into the PIXEL Desktop GUI.
Both RPis SSH is enabled.
A RPi P3 Model B has three Terminal windows open.
- First terminal window is for SSH control.
- ssh pi@10.0.0.20
- cd Pictures
- ./takepics.sh 120 55
- Use exit to terminate connection.
- Second terminal window is for SFTP file transfer.
- sftp pi@10.0.0.20
- Use cd, get and put commands.
- Use exit to terminate connection.
- Third terminal window is for SSH -Y X11 window forwarding to view the photos on the remove RPi Zero using X11 File Manager and X11 Image Viewer.
- ssh -Y pi@10.0.0.20 pcmanfm
- Go to the Pictures directory and double click on the JPG file to view it.
- Use exit to terminate connection.
The above three windows work fine on a MacBook Pro (OS X Yosemite V10.10.5) using Terminal and X11 Window System from XQuartz.
A RPi Zero W.
- In the Pictures directory is the below takepics.sh.
- The script creates a directory, take a number of photos with a delay between them.
- A log file is created with the date, time and photo file name of each photo taken.
Download takepics.sh
-
#!/bin/bash
#
# takepics.sh bash script
# Created for RPi Zero W and Pi Camera V2.0
# David Haworth, WA9ONY
# http://www.stargazing.net/david/RPi/index.html
#
# Check for number of photos parameter and delay parameter.
# Delay parameter does not take in account the fime for raspistill operation.
# raspistill takes about 5 seconds.
if test $# -eq 0
then
echo "You need to enter two numbers after the takepics.sh command."
echo "The first number is the number of photos to be taken."
echo "The second number is the delay value in units of seconds between photo."
exit 1
fi
# Create a directory with today's date if it is not present
picdir=~/Pictures/$(date --rfc-3339=date)
if [ -d $picdir ]; then
echo "directory $picdir exits"
else
echo "Created directory $picdir"
mkdir $picdir
mkdir $picdir/log
fi
# Set up start and stop numbers for loop
# Make sure photos do not over righ existing photos.
filecnt=$(ls ${picdir} | wc -l)
let filesend=${1}+${filecnt}-1
# Take phtotos loop and create log file of date, time and photo file.
for i in $(seq ${filecnt} ${filesend})
do
filename=${picdir}/pic_$i.jpg
echo "$(date) ${filename}"
echo "$(date) ${filename}" >> ${picdir}/log/picslog.txt
raspistill -v -o ${filename}
sleep ${2}s
done
exit 0
Turning on the headless RPi Zero W:
- There are no display or USB devices attached to the RPi Zero W.
- Plug in the battery pack to the USB power connector.
- Wait two minutes for the RPi Zero W to boot up into PIXEL Desktop.
- If needed use Fing on the iPhone to scan the IP addresses on the router to determine the RPi Zero W IP address.
- Use the RPi P3 Model B to control the RPi Zero W using SSH, SFTP and X11 forwarding. (see above for details)
Shutdown the RPi Zero W by remote RPi P3 Model B:
- Close X11 windows.
- Exit in Terminal 3 window.
- Exit in Terminal 2 window.
- sudo shutdown -h now in Terminal 1 window.
- Wait two minutes and disconnect RPi Zero W power.
- Disconnect the battery pack and put on a USB power supply to charge.
Related projects:
Project 71: Install Firefox Browser
Firefox Extended Support Release (ESR)
is a powerful, extensible web browser with support for
modern web application technologies.
This is a metapackage depending on all available localizations of Firefox ESR
The below installation uses the PIXEL Desktop GUI.
- In the PIXEL Desktop GUI open the top left Application Menu and select Preferences, Add / Remove Software.
- In the Add / Remove Software window search for vlc.
- Check on firefox and plug-ins boxes to select them.
- Click on Apply button to install.
- Reboot
To open Firefox.
- In the PIXEL Desktop GUI open the top left Application Menu and select Internet, Firefox ESR.
Firefox website.
Project 72: scrot: Screen Capture
scrot (SCReen shOT) is a simple command line screen capture
utility that uses imlib2 to grab and save images. Multiple
image formats are supported through
imlib2's dynamic saver modules.
IF scrot is not installed on your RPi the below installation uses the PIXEL Desktop GUI.
- In the PIXEL Desktop GUI open the top left Application Menu and select Preferences, Add / Remove Software.
- In the Add / Remove Software window search for scrot.
- Check on scrot box to select it.
- Click on Apply button to install.
To use scrot.
- In GUI.
- Press the PrintScr key to capture the desktop image and save it to the pi directory as a PNG file.
- In Terminal.
- scrot -sb
- With the mouse click on the window of interest to take a screencshot of it.
For help scrot.
-
pi@raspberrypi:~ $ scrot -h
Usage : scrot [OPTIONS]... [FILE]
Where FILE is the target file for the screenshot.
If FILE is not specified, a date-stamped file will be dropped in the
current directory.
See man scrot for more details
-h, --help display this help and exit
-v, --version output version information and exit
-b, --border When selecting a window, grab wm border too
-c, --count show a countdown before taking the shot
-d, --delay NUM wait NUM seconds before taking a shot
-e, --exec APP run APP on the resulting screenshot
-q, --quality NUM Image quality (1-100) high value means
high size, low compression. Default: 75.
For lossless compression formats, like png,
low quality means high compression.
-m, --multidisp For multiple heads, grab shot from each
and join them together.
-s, --select interactively choose a window or rectangle
with the mouse
-u, --focused use the currently focused window
-t, --thumb NUM generate thumbnail too. NUM is the percentage
of the original size for the thumbnail to be,
or the geometry in percent, e.g. 50x60 or 80x20.
-z, --silent Prevent beeping
SPECIAL STRINGS
Both the --exec and filename parameters can take format specifiers
that are expanded by scrot when encountered.
There are two types of format specifier. Characters preceded by a '%'
are interpreted by strftime(2). See man strftime for examples.
These options may be used to refer to the current date and time.
The second kind are internal to scrot and are prefixed by '$'
The following specifiers are recognised:
$f image path/filename (ignored when used in the filename)
$m thumbnail path/filename
$n image name (ignored when used in the filename)
$s image size (bytes) (ignored when used in the filename)
$p image pixel size
$w image width
$h image height
$t image format
$$ prints a literal '$'
\n prints a newline (ignored when used in the filename)
Example:
scrot '%Y-%m-%d_$wx$h_scrot.png' -e 'mv $f ~/images/shots/'
Creates a file called something like 2000-10-30_2560x1024_scrot.png
and moves it to your images directory.
This program is free software see the file COPYING for licensing info.
Copyright Tom Gilbert 2000
Email bugs to
pi@raspberrypi:~ $
scrot web site.
MagPi issue 73, page 36 PI 101: Take Screenshots.
Project 73: WiFi Tools
The above screen capture shows the RPi Wi-Fi
(IEEE 802.11 )
status.
This status is the result of the command wavemon with no options in the Terminal window.
Wavemon allows you to watch signal and noise levels,
packet statistics, device configuration and network
parameters of your wireless network hardware.
The below installation uses the PIXEL Desktop GUI.
- In the PIXEL Desktop GUI open the top left Application Menu and select Preferences, Add / Remove Software.
- In the Add / Remove Software window search for wavemon.
- Check on wavemon box to select it.
- Click on Apply button to install.
Examples:
pi@raspberrypi:~ $ wavemon -h
usage: wavemon [ -dhlrv ] [ -i ifname ]
-d Dump the current device status to stdout and exit
-g Ensure screen is sufficiently dimensioned
-h This help screen
-i Use specified network interface (default: auto)
-r Generate random levels (for testing purposes)
-v Print version number
pi@raspberrypi:~ $
pi@raspberrypi:~ $ wavemon -d
Configured device: wlan0 (IEEE 802.11)
Security: WPA, WPA2, TKIP, CCMP
Key sizes: WEP-40, WEP-104
essid: "davidha_27901"
channel: 6
frequency: 2.437 GHz
tx-power: 31 dBm (1258.93 mW)
mode: Managed
access point: 08:BD:43:B4:34:07
bitrate: 24 Mbit/s
retry: short limit 7
rts thr: off
frag thr: off
encryption: n/a (requires CAP_NET_ADMIN permissions)
power management: on
link quality: 68/70
signal level: -42 dBm (0.06 uW)
noise level: 0 dBm (1.00 mW)
SNR: -42 dB
RX total: 22989 packets (11.16 MiB)
invalid nwid: 0
invalid key: 0
invalid fragm.: 0
missed beacons: 0
misc errors: 0
TX total: 7627 packets (995.99 KiB)
exc. MAC retries: 0
List of Commands for Wifi Monitoring/Troubleshooting
- ifrename
- iwconfig
- iwlist
- iwpriv
- iwspy
pi@raspberrypi:~ $ sudo iwlist wlan0 scan
wlan0 Scan completed :
Cell 01 - Address: 08:BD:43:B4:34:07
Channel:6
Frequency:2.437 GHz (Channel 6)
Quality=70/70 Signal level=-34 dBm
Encryption key:on
ESSID:"davidha_27901"
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
9 Mb/s; 12 Mb/s; 18 Mb/s
Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
Mode:Master
Extra:tsf=0000000000000000
Extra: Last beacon: 30ms ago
IE: Unknown: 000D646176696468615F3237393031
IE: Unknown: 010882848B960C121824
IE: Unknown: 030106
IE: Unknown: 050400020000
IE: Unknown: 2A0100
IE: Unknown: 32043048606C
IE: Unknown: 2D1AAD0103FFFF0000000000000000000000000000000406E6E70D00
IE: Unknown: 3D1606080400000000000000000000000000000000000000
IE: Unknown: 4A0E14000A002C01C800140005001900
IE: Unknown: 7F0101
IE: Unknown: DD180050F2020101820003A4000027A4000042435E0062322F00
IE: Unknown: DD1E00904C33AD0103FFFF0000000000000000000000000000000406E6E70D00
IE: Unknown: DD1A00904C3406080400000000000000000000000000000000000000
IE: Unknown: DD0900037F01010000FF7F
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
IE: Unknown: DD1D0050F204104A0001101044000102103C0001011049000600372A000120
pi@raspberrypi:~ $
For more information on WiFi Tools go to the web site.
Thanks to Jeff, W7ESC for this information.
Project 74: HDMI Display Resolution Changes with Terminal
One day the HDMI TV started to cut off the left side of the RPi PIXEL desktop.
I could not get to the application menu to change the display resolution in
- Application Menu, Preferences, Raspberry Pi Configuration, System, Resolution.
I was able to start Terminal.
Here is how to change the HDMI resolution in Terminal.
- sudo raspi-config
- Select Advanced Options
- Select Resolution
- Change resolution
- Save changes will cause a reboot
By trying different resolutions I got the full desktop to display on the HDMI TV.
Project 75: Creating and Writing a RPi Image File (.img)
The advantages of a RPi image file:
- Backup the entire RPi micro SD card without missing any files or other needed information such as partitions, etc.
- Saving the image files on large capacity portable USB hard drives.
- Use an image file to create an operating systems on the RPi micro SD card.
- Use an image file to create an operating systems with application software (DV4mini, etc.) on the RPi micro SD card.
The image file is one file with the extension of .img.
The image file contains all the partitions and volumes of the micro SD card drive.
Using a Windows PC.
-
Download
Win32 Disk Imager
Win32 Disk Imager
at
SourceForge.
- Backups a micro SD card to an image file.
- Writes a disk image file to a micro SD card.
- Unzip the download file.
- In the Win32DiskImager-1 directory double click on Win32DiskImager.exe to start the program.
Example of backing up a RPi micro SD card [E:\] to a image file (C:/RPi20170511.img).
- This example creates a .img file from the RPi micro SD card.
-
- Put the RPi micro SD card in an adapter into the Windows PC.
- Use Windows file manager to determine the micro SD card drive letter. In this example E:.
- Start the Win32DiskImager.exe program by double clicking on it.
- In Win32 Disk Imager - 1.0 widow select the micro SD card letter. (double check the drive letter). In this example E:.
- In Win32 Disk Imager - 1.0 widow select the file folder icon next to the Image File box.
- In Select a disk image, select a directory and enter a file name like RPi20170511.img, click on Open.
- In Win32 Disk Imager - 1.0 widow click on the Read button to crete the .img file.
- On of my micro SD adapter gives read errors.
- Using a different micro SD adapter resulted in no errors.
- The .img file will be very large. For example, a 32 GB micro SD card resulted in a 31.1 GB image file.
- I copied the .img file to two different portable USB hard drives for backup.
Writes a disk image, C:/RPiImages/rpi2017509.img file, to a micro SD card in [E:\].
-
- Put the micro SD card in an adapter into the Windows PC.
- All files on the micro SD card will be deleted.
- If needed back up the micro SD card file before starting this process.
- Use Windows File Manager to determine the micro SD card drive letter. In this example E:.
- Start the Win32DiskImager.exe program by double clicking on it.
- In Win32 Disk Imager - 1.0 widow select the micro SD card letter. (double check the drive letter). In this example E:.
- In Win32 Disk Imager - 1.0 widow select the file folder icon next to the Image File box.
- In Select a disk image, select the directory and the .img file (this example: RPi20170511.img) click on Open.
- In Win32 Disk Imager - 1.0 widow click on the Write button to create the micro SD card disk image.
Project 76: FAT32 Formating RPi micro SD Card
SD Formatter 4.0 ensures that the micro SD Card has a clean FAT32 format.
FAT32 formating a RPi micro SD card using a Windows PC.
- Download SD Formatter 4.0
- Install SDFormatter
- Put an empty micro SD card in an adapter into the Windows PC.
- Use Windows File Manager to determine the micro SD card drive letter. In this example E:.
- Start the SDFormatter program by double clicking on its icon.
-
- Select the micro SC card drive. (In the above screen capture: E:)
- Add volume label, (In the above screen capture: RPIBERRYBOT for RPi BerryBoot)
- Click on Format
- When down safely eject the micro SC card from the computer.
Project 77: BerryBoot
BerryBoot
allow multiple operating systems on a single micro SD card for the RPi.
You select a operating system to use at boot time.
Installing Berry Boot using a Windows PC.
- Download BerryBoot for the Raspberry Pi.
- Unzip the Berryboot zip file.
- Put an empty micro SD card in an adapter into the Windows PC.
- Do a clean FAT32 format of the micro SD card, see previous project: FAT32 Formating RPi micro SD Card.
- Copy Berryboot files to the micro SD card.
- When down safely eject the micro SC card from the computer.
BerryBoot
Android
operation system install on a RPi P3 Model B.
- Put an Berryboot micro SD card in the RPi P3 Model B.
- Power on the RPi.
- Berryboot did not work correctly with one HDMI TV.
- Berryboot did work with a higher resolution HDMI TV monitor and HP HDMI 1080p.
- Update Berryboot if new version notice is shown.
- I choose the Android because it was small download at 212.1 MB.
- I tried to put .img files on a USB flash but at over 4 GB the image files are too large for a FAT or FAT32 USB flash memory.
- The Berryboot would not recognize a NTFS or exFAT USB hard drives with the .img files.
- I am stuck with downloading the large files over a slow internet connection.
- The Android is very slow when first used.
- Over 80 minutes late still no Android screen on the HDMI TV.
- RPi green LED is flashing which means micro
SD card activity.
- Android shows command line interface then the display goes blank.
Tried two different HDMI TVs and a HP HDMI 1080p computer display
- Need to try the install process at
Anrodoid and Raspberry Pi P3
BerryBoot
Raspbian
operating system install.
- The download by BerryBoot stopped half way through the download.
- The first part of the download was lost and BerryBoot starts over:-(
- I gave up on trying to download this large file that restarts back to zero when started again.
- Bytes: 797.5 MB of 1494.4 MB
- Speed: 0.6 mbit
- ETA: 2 h 25 m left to download
BerryBoot
Raspbian
Lite 2016.11 (243 MB) download worded the first time.
- Powered on
- Default user name and password
- Login: pi
- Password: raspberry
- No Desktop GUI in the lite version.
- Shutdown with
BerryBoot
Memtester version 4.3.0
(32-bit) download worded the first time.
- Runs memory tests
- The HDMI TV screen saver goes blank and there seems no way to get it back on, even off/on cycle of the HDMI TV did not work.
- Works better with the HP HDMI 1080p, screen saver still goes on, but, display comes back on with pressing the shift key.
- Have not found a way to stop the memtester, except for power cycle.
- Other references:
BerryBoot
Puppy Linux
alpha 4 download the first time.
- Puppy Linux Desktop fails.
- There is a problem with selecting the correct X window driver.
- The command line interface works.
- Tried two different HDMI TVs with different HDMI resolutions and a HP HDMI 1080p computer monitor without success.
- Other references:
BerryBoot
OpenELEC
downloaded on the second try.
- OpenELEC KODI started
- Connected to Wi-Fi ok
- Added the YouTube plug-in
- YouTube searched for Raspberry Pi and played a 6 minute video.
- Sound stops working every ~2 to 3 minutes, video become jerky when sound stops working.
- Halt video, restarted video, wait for buffering to fill, over 40 seconds, still no sound.
- Restart to the video causes waiting for buffer to fill again.
- First impression OpenELEC based on YouTube, I will be sticking to the YouTube app on the iPhone smaller display.
- I believe my Internet connection is not good enough to support the higher resolution YouTube videos.
- After two YouTube videos, YouTube stopped working because daily quota was reached with two 6 minute videos.:-(
- NPR radio worked fine.
- Apple iTunes Video Podcast Ham Radio 2.0 did not work, it did not show the video, but audio worked.
- Apple iTunes Music/Audio Podcast Ham Radio 2.0 worked fine.
- Yahoo! Weather worked fine.
- EEVBlog took 20 seconds to start buffering, worked fine for about 6 minutes and then the audio stopped and video became jerky.
- Google pictures search worked fine.
- Maps Browser failed to word.
- Other references:
Project 78: openSUSE Operating System Install
openSUSE is another Linux operating system that runs on the RPi P3 Model B.
Websites:
The magazine
Raspberry Pi Geek
, issue 22, May/June 2017 contained a DVD with openSUSE Operating System (3.3 GB).
openSUSE installation using the Raspberry Pi Geek magazine DVD:
- Creating a micro SD card with the openSUSE operating system.
- Copy the openSUSE.raw file (3.3 GB) from the DVD to the Windows computer.
- Use
Win32 Disk Imager
to write the openSUSE.raw file to the micro SD card.
- Install the micro SD card with openSUSE operating system in the RPi P3 Model B.
- The HDMI TV monitor did not work.
- The HDMI 1080p monitor worked fine.
- Default user name and password
- Login: root
- Password: linux
- Attached the LAN cable to the RPi P3 Model B.
- Opened Firefox fine.
- Opened Terminal, used ifconfig to determine the IP address.
- Used a MacBook terminal, SSH and SFTP to remove control the RPi.
Project 79: Ubuntu Operating System Install
Ubuntu is another Linux operating system that runs on the RPi P3 Model B.
Installing Ubuntu:
- Ubuntu MATE for the Raspberry Pi 2 and Raspberry Pi instructions.
- Download Ubuntu MATE select Ubuntu MATE 16.04.2 LTS (Long Term Support)
- Download Raspberry Pi for aarch32 (ARMv7) computers, like: Raspberry Pi.
- The ubuntu-mate-16.04.2-desktop-armhf-raspberry-pi.img.xz file is 1.18 GB
- Check the download file checksum on the MacBook with the terminal command.
- shasum -a 256 ubuntu-mate-16.04.2-desktop-armhf-raspberry-pi.img.xz
- On the MaxBook uncompress the .xz file with terminal command.
- gunzip ubuntu-mate-16.04.2-desktop-armhf-raspberry-pi.img.xz
- MacBook Termimal example:
Davids-MacBook-Pro:~ davidhaworth$ shasum -a 256 ubuntu-mate-16.04.2-desktop-armhf-raspberry-pi.img.xz
dc3afcad68a5de3ba683dc30d2093a3b5b3cd6b2c16c0b5de8d50fede78f75c2 ubuntu-mate-16.04.2-desktop-armhf-raspberry-pi.img.xz
Davids-MacBook-Pro:~ davidhaworth$ gunzip ubuntu-mate-16.04.2-desktop-armhf-raspberry-pi.img.xz
Davids-MacBook-Pro:~ davidhaworth$
Writes a disk image, ubuntu-mate-16.04.2-desktop-armhf-raspberry-pi.img file, to a micro SD card.
- See
Project 75: Creating and Writing a RPi Image File (.img)
- Insert the micro SD card into a RPi P3 Model B.
- Power-on the RPi.
- Follow the on screen Ubuntu installation instructions.
- Enjoy Ubuntu
Other references:
Project 80: Command Line History
The command line interface
(CLI)
keeps a history of the commands entered.
To see all the commands in history use the command:
To search for a command name in history use the command:
- history | grep command_name
Running history command, use ! and the history command number.
- Example: To run history command number 92.
Keyboard arrow keys operation
- Up arrow key goes through the command history to the oldest commands entered.
- Down arrow key goes through the command history to the most recent commands entered.
- Keyboard left and right arrow keys move the cursor through the command line.
Manual for history command:
Project 81: RPi Powered by 12 Vdc
The purpose is to run the RPi off a 12 Vdc battery.
In the above photo is:
Power usage from the battery includes the 12 V to 5 V power adapter and the RPi at 5 V:
- Measurements with PIXEL Desktop in idle mode.
- Current 0.38 A at 12.69 VDC, 4.8 W.
- Measurements with PIXEL Desktop in screen saver mode.
- Current 0.19 A at 12.73 VDC, 2.4 W.
Project 82: RPi Stores
A list of stores with RPi stuff that I a have purchased from and recommend.
- Amazon has RPi, kits, caseses, books, etc. and has free shipping.
- CanaKit is a good source for many types of RPi kits that are on Amazon with free shipping.
- Adafruit Industries has a large selection of RPi products and accessories.
- The PiHut
- Element14
- Raspberry Pis are manufactured by Sony in the UK.
- Element14 is a major distributor of Raspberry Pis and you typically see Element14's name of the Raspberry Pi box.
- Element14 is a good source of Raspberry Pi videos, benchbarks and documentation.
Local stores
A list of RPi stores for future reference:
Project 83: RPi Using the iPhone for Internet Connection
The iPhone can be set up as a personal hotspot so that the RPi can connect to the Internet through the iPhone cell phone service.
This means the RPi can connect to the Internet when there is no Wi-Fi internet service available and there is cell phone coverage.
When the RPi is connected to the iPhone using Wi-Fi as a personal hotspot the iPhone cannot connect to Wi-Fi for internet access.
The iPhone uses the cell phone to connect to the internet.
Your cell phone service may charge you for data service used.
- iPhone example setup:
- On the iPhone
- Go to Settings, Personal Hotspot, turn on Personal Hotspot.
- Remember the Hotspot name and the Wi-Fi Password.
- On the RPi
- In PIXEL Desktop,
- Select the Wi-Fi icon next to the Speaker icon in the top menu bar, right side.
- Select the iPhone personal hotspot name and enter the password.
- It may take a few minutes to connect and your cell phone must be operational.
- Test the Wi-Fi connection with the RPi web browser.
Project 84: RPi Zero W Breadboard
This project takes a RPi Zero W and solders a 40 pin socket on the bottom of the circuit board.
Next, the RPi Zero W is plugged into to a GPIO extension board that plugs into a white breadboard strip.
A another computer (RPi P3 Model B or MacBook) is used to control the RPi Zeron W breadboard computer using Wi-Fi and SSH.
The RPi Zero W breadboard computer only needs power using the micro USB connector.
Building the RPi Zero W Breadboard computer system:
- Solder a 40 pin socket on the bottom of the RPi Zero W circuit board.
- Install a heat sink on the larg IC on the RPi Zero W.
- Plug the RPi Zero W into the GPIO extension board.
- Plug the GPIO extension board into the white breadboard.
- Create a Raspbian micro SD card for the RPi Zero W.
- Download NOOBS with Raspbian V2.4.0.
- Using a Windows computer to unzip the file.
- Put a 32 GB Class 10 micro SD card into an adapter and plug it into the Windows computer.
- Use SDFormatter to do a clean FAT32 format of the micro SD card.
- Copy the NOOBS with Raspbian V2.4.0 files to the micro SD card root.
- Eject the micro SD card from the Windows computer.
- Insert the micro SD card into the RPi Zero W.
- Attach a HDMI TV or monitor.
- Attach an USB hub.
- Attach a USB keyboard and mouse to the USB hub.
- Turn on the HDMI monitor or TV.
- Attach power to the RPi Zero W micro USB power connector.
- Software installation:
- During the NOOBS install select the Raspbian operating system and follow screen prompts.
- Software configuration:
- Change the password from the default password of raspberry.
- Set Locale.
- Set Timezone.
- Set Keyboard.
- Setup Wi-Fi countruy.
- Setup Wi-Fi with password.
- Test Wi-Fi connection using the browser.
- Enable SSH
- Check the IP Address with.
- hostname -I
- The IP address is 10.0.0.10 in my case, yours will be most likely different.
- Remove the HDMI TV or monitor.
- Remove the USB keyboard and mouse to the USB hub.
- Remove USB hub.
- Use SSH and SFTP on another computer to control the RPi Zero W breadboard computer.
Project 85: RPi Zero W Breadboard Testing Voltage
Use a DMM to test the 5 Vdc and 3.3 Vdc on the RPi Zero W breadboard computer.
Check the 5
Volts DC
on the breadboard.
- Set the multimeter to 20 V dc range.
- Connect the
multimeter black ground lead to the GND strip of holes on the breadboard.
- Connect the multimeter red lead to the 5 V strip of holes on the breadboard.
- The multimeter measured 5.09 Vdc.
- Be aware there is tolerance for the RPi voltage source and there is measurement
accuracy of the multimeter that result in not measuring exactly 5.00 Vdc.
WARNING, never connect the 5 V directly to the other pins of the breadboard.
The other pins are connected to the CPU IC and the CPU runs on 3.3 V.
The 5 V attached to these pins will most likely destroy the RPi CPU.
Check the 3.3
Volts DC
on the breadboard.
- Set the multimeter to 20 Vdc range.
- Connect the
multimeter or volt meter
black ground lead to the GND strip of holes on the breadboard.
- Connect the multimeter red lead to the 5 V strip of holes on the breadboard.
- The multimeter measured 3.32 Vdc.
- Be aware there is tolerance for the RPi voltage source and there is measurement accuracy
of the multimeter that result in not measuring exactly 3.30 Vdc.
WARNING, never connect the 5 V and 3.3 V directly to each other.
This will short the two different power supply voltage to each other and damage may occur.
WARNING, never connect the 5 V or 3.3 V directly to ground.
This will short the power supply voltage to ground and damage may occur.
Project 86: Nano Command Line Text Editor
GUN Nano
is a simple command line interface text editor that is used at the command line interface or Terminal window.
Nano is one of many command line text editors that is available.
With SSH and Nano you can create a Python programs on a remote RPi computer that has no display, keyboard or mouse.
The below example create a Python hello world program with Nano.
- At the command line enter:
- In Nano enter the below text with a return:
- To save the text to the file, in Nano enter:
- CTRL-o or F3 key and return.
- To exit Nano enter:
Checking the hello_world.py file.
- Use li command to see hello_world.py file in the current working directory.
- Use cat to display the contents of hello_world.py file.
Web sites:
Project 87: RPi Zero W Breadboard Remote Python Programming
Use a RPi P3 Model B to remote program the RPi Zero W breadboard computer with Python.
In the command line interface use SSH, Nano and Python 3 to create and run a Python program on the RPi Zero W breadboard computer.
Requirements:
- SSH is turned on on both RPi P3 Model B and RPi Zero W breadboard computer.
- Both RPi P3 Model B and RPi Zero W breadboard computer connected to the same router.
- RPi Zero W breadboard computer:
- IP address (10.0.0.10 in this example, yours will be most likely different)
- Password.
Procedure:
- At the P3 Model B computer command line connect to the RPi Zero W breadboard computer:
- ssh pi@10.0.0.10
Enter yes and the password.
- Create the Python program file, hello_world.py, with Nano,
- In Nano enter the below text and end with the return key.
- In Nano save the file and exit Nano with the Function keys.
- Function key F3
- Return key
- Function key F2
- Run the Python program on the RPi Zero W breadboard computer with:
- The hello_world.py program runs and displays
- To exit and close the SSH connection, enter:
Related projects:
Project 88: SSH: Enable SSH
SSH
allow another computer to control the RPi with the command line interface and the Terminal window in the PIXEL Desktop GUI.
Before turning on
SSH make sure you change the default password of RPi.
Below are two methods to enable SSH on the RPi.
Method 1 using PIXEL Desktop GUI:
- Open the top left Application Menu and select Preferences, Raspberry Pi Configuration.
- In Raspberry Pi Configuration window select Interface tab, check SSH Enable box.
- A reboot will be required to enable SSH.
Method 2 using command line interface uses the Raspberry Pi Software Configuration Tool (sudo raspi-config):
- In the command line interface enter:
- sudo raspi-config
- In the Raspberry Pi Software Configuration Tool select 5 Interface Options, return key.
- Select P2 SSH, return key.
- Select Yes to enable SSH,
- A reboot will be required to enable SSH.
Related projects:
Project 89: RPi Zero W Breadboard Testing GPIO23 with DMM
Use a DMM and Python interactive mode to test the GPIO23 on the RPi Zero W breadboard using a
SSH remote control with a RPi P3 Model B.
Python interactive mode is used to turn on and off GPIO23.
GPIO23 off (False state) is 0 V and the on (True state) is 3.3 Vdc with no load attached.
Requirements:
- SSH is turned on on both RPi P3 Model B and RPi Zero W breadboard computer.
- Both RPi P3 Model B and RPi Zero W breadboard computer connected to the same router.
- RPi Zero W breadboard computer:
- IP address (10.0.0.10 in this example, yours will be most likely different)
- Password.
Procedure:
- Measure the voltage on GPIO23.
- Set the multimeter to 20 V DC range.
- Connect the
multimeter black ground lead to the GND strip of holes on the breadboard.
- Connect the multimeter red lead to the GPIO23 strip of holes on the breadboard.
- The multimeter measured 0.00 Vdc with GPIO in an inactive state.
- Activating GPIO23 and setting the GPIO23 to True sate with a remote RPi P3 Model B.
- Connect to RPi Zero W Breadboard using SSH.
- ssh pi@10.0.0.10
- Enter password when requested.
- Start Python and use Python in the interactive mode.
- sudo python
- import RPi.GPIO as GPIO
- GPIO.setmode(GPIO.BCM)
- GPIO.setup(23, GPIO.OUT)
- GPIO.output(23, True)
- The multimeter measures the GPIO23 True state output of 3.32 Vdc with no load as shown below.
- GPIO.output(23, False)
- GPIO.cleanup()
- exit()
- Exit and close the SSH connection.
Related projects:
Project 90: Install XScreenSaver
XScreenSaver is a screen saver that works in the RPi PIXEL Desktop GUI.
RPi PIXEL Desktop GUI is based on X11.
XScreenSaver is a modular screen saver and locker for X11, containing more than
200 screen savers.
This package includes the bare minimum needed to blank and lock your screen.
Install this package if you prefer xscreensaver to gnome-screensaver.
If you prefer gnome-screensaver, you don't need to install this package.
The graphical display modes are in the xscreensaver-data, xscreensaver-data-extra,
xscreensaver-gl and xscreensaver-gl-extra packages.
The below installation uses the RPi PIXEL Desktop GUI.
- In the PIXEL Desktop GUI open the top left Application Menu and select Preferences, Add / Remove Software.
- In the Add / Remove Software window search for xscreensaver.
- Check on both xscreensaver software packages boxes to select them.
- Click on Apply button to install them.
- After installation Reboot the RPi.
XScreenSaver verson 5.30, 11-Sep-2014 was installed with the above install process.
To open XScreenSaver settings.
- In the PIXEL Desktop GUI open the top left Application Menu and select Preferences, Screensaver
When XScreenSaver is running, move the mouse or use the ESC key to exit the screen saver.
XScreenSaver default timer is 10 minutes and can be change in the Screensaver preferences.
The XScreenSaver installed display modes include:
- CWaves
- Deco
- Distort
- Fiberlamp
- FuzzzyFlakes
- Galaxy
- Hexadrop
- m6502
- MetaBalls
- Penrose
- PopSquares
- Ripples
- ShadeBobs
- SlideScreen
- Swirl
- Tessellimage
- XLyap
XScreenSaver runs automatically. To turn XScreenSaver off go the XScreenSaver settings File menu and select Kill Daemon.
XScreenSaver website.
Project 91: Virtual Consoles (VC)
Virtual Consoles (VC) allow a user to have multiple sessions and multiple logins on the same RPi.
For example, you use a program in one VC and in another VC you read its documentation.
The RPi seven Virtual Consoles are tty1, tty2, tty3, tty4, tty5, tty6 and tty7.
Virtual Consoles can be a Command Line Interface (CLI) or a PIXEL desktop GUI.
The RPi at power-on has six Virtual Consoles for the Command Line Interface (CLI) called tty1, tty2, tty3, tty4, tty5, and tty6.
The power-on Command Line Interface (CLI) is tty1.
The RPi at power-on has one Virtual Consoles tty7 for the PIXEL desktop GUI.
Virtual Consoles (VC) are also referred to as Virtual Terminals (VT).
How to switch to between VCs.
- If you are in the RPi PIXEL GUI and want to switch to another VC.
-
Enter CTRL+ALT+F1, CTRL+ALT+F2, CTRL+ALT+F3, CTRL+ALT+F4,
CTRL+ALT+F5, CTRL+ALT+F6, or CTRL+ALT+F7.
- In a CLI VC enter CTRL+ALT+F7 or ALT+F7 to go to the VC tty7 with the PIXEL GUI.
- In a CLI VC enter CTRL+ALT+F1, CTRL+ALT+F2, CTRL+ALT+F3, CTRL+ALT+F4,
CTRL+ALT+F5, CTRL+ALT+F6, or CTRL+ALT+F7 to switch to tty1, tty2, tty3, tty4, tty5, tty6, or tty7.
- In the CLI VC enter ALT+F1, ALT+F2, ALT+F3, ALT+F4,
ALT+F5, ALT+F6, or ALT+F7 to switch to tty1, tty2, tty3, tty4, tty5, tty6, or tty7.
- In the CLI use ALT+Left Arrow or ALT+Right Arrow to switch to the previous or the next VC.
In a VC with the CLI you can start the PIXEL desktop GUI by entering starts command.
This means that you can have multiple PIXEL desktops operating in different VC.
The more VCs that are being used the more RPi resources are being used.
Therefore, the RPi may operate slower.
Links
Project 92: PIXEL Multiple Desktops
The
PIXEL
Desktop GUI supports multiple desktops.
To add a desktops:
- Click the middle mouse-button on the desktop; left-click on "Add new desktop".
To go to a desktops:
- Click the middle mouse-button on the desktop; left-click on desired desktop.
To go to a running program:
- Click the middle mouse-button on the desktop; left-click on desired running program.
To cycle through the different desktops:
- Key board enter CTRL-ALT+Left Arrow or CTRL-ALT+Right Arrow to switch to the previous or the next desktop.
To remove the last desktops:
- Click the middle mouse-button on the desktop; left-click on "Remove last desktop".
Desktops are also called workspaces.
Mouse hints
- Some mouse wheels act as a middle mouse-button, try clicking on the mouse wheel to see if it acts as a middle mouse-button.
Linkes
Project 93: CLI Wildcard Characters
The CLI support the use of wildcards in directory names and files names.
All wildcard characters can be combined with wildcard characters and other characters.
* Wildcard character for any number of characters.
- 0, 1 or more any character.
? Wildcard character for any one character.
- Only one of any character.
[set] Wildcard characters for any one character in the set.
- Only one of any character in the set.
- Single odd number character with [13579]
- Single even number character with [02468]
- Set range with
- Any single number [0-9]
- Any three digit number [0-9][0-9][0-9]
- Any single lower case letter [a-z]
- Any two lower case letters [a-z][a-z]
- Any single upper case letter [A-Z]
[!set] Wildcard characters or any one character NOT in the set.
- Only one of any character NOT in the set.
- Any single character that is not odd number character with [!13579]
- Any single character that is not even number character with [!02468]
Linkes
Book
Project 94: CLI BASH Version
BASH is Bourne Again SHell.
CLI command for BASH version:
Book
Project 95: Text Expansion with Braces
BASH is Bourne Again SHell.
CLI command for BASH version:
Linkes
Project 96: Wolfram Mathematica
Wolfram
Mathematica
is a standard part of the
Raspbian
release.
The above screen capture shows a histogram of the counts of FT8 signal reports received from other amateur radio stations.
The histogram was created with a single line of code that is above the histogram plot.
The signal reports are numbers in ASCII, one number (range from -24 to +15) per line.
Signal report -14 was received the most from other amateur radio stations.
Linkes
Project 97: sed: Stream Editor
sed
is a stream editor that is used in the Linux command line interface (CLI).
Linkes
Project 98: LibreOffice Impress Templates Downloads
LibreOffice Impress
is a presentation program that is part of the standard Raspbian OS install.
Linkes
Project 99: RPi Raspbian to Unix Timeline
Raspbian is the official
operating system software for the Raspberry Pi and its roots go back to Unix.
Timeline
- In 2012
Raspbian
was created for the
Raspberry Pi
SBC and it is a version of Debian.
- In 1993
Debian is a distribution of Linux.
- In 1991
Linux
was created as an open-source software by Linus Torvalds and it is based on Unix.
- In early 1970s Unix was created by AT&T Bell Labs.
Project 100: HDMI Video Capture
This project's objective is to capture the Raspberry Pi HDMI video and not have to use a video camera to capture the monitor screen.
The ClearClick HD Capture Box captures the Raspberry Pi HDMI video output and records the video as a MP4 video file on the USB memory device that is plugged into the ClearClick HD Capture Box.
The ClearClick HD Capture Box captures the video as 1080 or 720 MP4 file which is selected by holding the record button down for 5 seconds.
I use 720 MP4 format because the files are smaller than the 1080 MP4 files.
The ClearClick HD Capture Box doe not capture HDMI audio.
ClearClick HD Capture Box has an audio mic input which I have not used.
Linkes
Project 101: Install gnome-screenshot
gnome-screenshot is an utility to capture the screen display and save it as an image file.
Internet connection is required to install the software and commands in the CLI are used.
To install Ggnome-screenshot.
- Update the repository index on the RPi.
- sudo apt-get update
- For help
- man apt-get
- apt-get --help
- Upgrade the software on the RPi.
- Install gnome-screenshot.
- sudo apt-get install gnome-screenshot
- Start gnome-screenshot.
- In the PIXEL Desktop GUI open the top left Application Menu and select Accessories, Screenshot Program.
How to use gnome-screenshot is in the MagPi issue 73, page 36 PI 101: Take Screenshots.
Project 102: Introduction to Raspbian Sound System
Raspbian default sound system is
PulseAudio (PulseAudio).
The Raspberry Pi has headphones jack for audio output. There is no audio mic input. For audio input a USB audio device or audio hat is needed.
Other audio systems that can be installed on the Raspberry Pi.
Project 103: CPU Info
Above photo is a Raspberry Pi Model 3 B+ CPU with its standard metal cover to improve heat cooling.
Below are three CLI command to display the CPU information for a Raspberry Pi Model 3 B.
Project 104: Raspbian Release Info
Below is the CLI command to display Raspbian information for a Raspberry Pi Model 3 B.
Below Raspbian information is for a Raspberry Pi Model 3 B+
(NOOBS version 3.0.0, release date 2018-11-16 ).
Below Raspbian information is for a Raspberry Pi Model 3 B install the is several years old.
Project 105: Installing Raspbian GNU, Linux 9 (stretch)
Debian
APT updates and upgrades do not install a new version of Linux from version 8 to version 9.
NOOPS v3.0.0 is used to install Raspbian GNU, Linux 9 (stretch).
Setting up the SD card installation.
- Format a 32 GB microSD card using SD Car Formatter.
- The microSD card will be
FAT32 format.
- Do not use microSD cards greater than 32 GB because they will not be formatted FAT32 which is required by the Raspberry Pi.
- Download NOOPS v3.0.0
- Unzip NOOPS v3.0.0 files
- Copy the unzip files to the root of the microSD card.
- Install the microSD card in the Raspberry Pi.
- Turn on the monitor.
- Plug in a USB keyboard and mouse.
- Connect the Raspberry Pi to your internet network using a LAN cable.
- The LAN cabe interface is faster than the Raspberry Pi WiFi connection.
- Power on the Raspberry Pi and follow the install instructions on the screen.
Links
Project 106: NTP: Network Time Protocol
NTP is a way for the RPi to use the Internet to set its clock.
The RPi does not keep time when it is powered off.
At power on the RPi can automatically set its clock if it is connected to the Internet.
The CLI ntpdate command is used to set the time and date.
Installing ntpdate
CLI usage
- sudo ntpdate pool.ntp.org
Documentation
Project 107: Install GNU Octave
GNU Octave is a scientific programming language that is mostly compatible with
Matlab
.
Internet connection is required to install the software and commands in the CLI are used.
To install Ggnome-screenshot.
- Update the repository index on the RPi.
- sudo apt-get update
- For help
- man apt-get
- apt-get --help
- Upgrade the software on the RPi.
- Install gnome-screenshot.
- sudo apt-get install gnome-screenshot
- Start gnome-screenshot.
- In the PIXEL Desktop GUI open the top left Application Menu and select Accessories, Screenshot Program.
How to use gnome-screenshot is in the MagPi issue 73, page 36 PI 101: Take Screenshots.
Documentation
Project 108: edX Introduction to Linux
edX
Introduction to Linux
is a limited time free audit access online course by the
LinuxFoundationX.
The course is a combination of video and text sessions.
edX offers over 2,000 courses that include Linux, counter science, signal processing, electronics, etc. from major universities.
I use edX on MacBook, iPhone and iPad.
My course notes.
Chapter 1
- three major distribution families within Linux: Red Hat, SUSE and Debian.
- Debian uses the DPKG-based APT package manager to install, update, and remove packages in Linux
- The course uses Ubuntu 18.04 LTS which is a Debian distribution.
- Raspberry Pi Raspbian is a Debian distribution.
Chapter 2
- Update the repository index on the RPi.
Project 109: Install Octave
GNU
Octave
is a powerful programming language that is free and is mostly compatible
with the commercial
MatLab software.
The above screen shots show a MatLab 3-D demo program running on Octave on the Raspberry Pi. A text file called MatLab_Wikipedia3D2.m was created with the Raspberry Pi text editor and saved in directory called Octave. In Octave CLI the command cd Octave was executed and the file name without .m was entered (MatLab_Wikipedia3D2).
Octave CLI is similar to Linux CLI. Linux CLI history and command completion works in Octave CLI.
Installing Octave
Install the updates
Install the updates
- sudo apt-get install octave
- sudo reboot
Octave
Octave YouTube tutorials
Octave tutorials
Octave code
Selective Octave CLI commands
- % %comment
- help help
- help --list
- pkg list
- pwd %print working directory
- mkdir %make directory
- cd %change directory
- ls %list directory
- clc %clear work space
- elf %clear current plot frame
MatLab
Glossary
Below is a list of glossary links.
- HOME
- SDR & GNU Radio
- RPi PROJECTS
- RADIO RPi PROJECTS
- SATELLITES
- WEATHER SATELLITES
- RADIO ASTRONOMY
- QRZ
-
© May 16, 2017
David Haworth,
WA9ONY
www.stargazing.net/david