Documente Academic
Documente Profesional
Documente Cultură
Submitted to:-
Ms. Saloni Bhatia
Submitted by :-
M. Lokesh (131200036)
Mayank Narayan Sharma(131200032)
Vaibhav Garg(131200057)
Vivek Banerjee(131200060)
ECE, IIIrd Year
Table of Contents :-
1. Overview of the project
2. Introduction to Raspberry Pi 2
4. Network setup and installation (using Ethernet cable and PuTTY - ssh
client)
9. Results
Overview of the Project
The linux packages were installed and updated onto the R-Pi using
basic linux commands on the terminal. The webcam was interfaced with
the R-Pi and it is serving the primary purpose of the sound recording or
audio input device.
Several generations of Raspberry Pi's have been released. The first generation (Pi 1)
was released in February 2012 in basic model A and a higher specification model B. A+ and
B+ models were released a year later. Raspberry Pi 2 model B was released in February 2015
and Raspberry Pi 3 model B in February 2016.
All models feature a Broadcom system on a chip (SOC) which include an ARM
compatible CPU and an on chip graphics processing unit GPU (aVideoCore IV). CPU speed
range from 700 MHz to 1.2 GHz for the Pi 3 and on board memory range from 256 MB to
1 GB RAM. Secure Digital SD cards are used to store the operating system and program
memory in either the SDHC or MicroSDHC sizes. Most boards have between one and four
USB slots, HDMI and composite video output, and a 3.5 mm phono jack for audio. Lower
level output is provided by a number of GPIO pins which support common protocols
like I2C. Some models have an RJ45 Ethernet port and the Pi 3 has on board WiFi 802.11n
and Bluetooth.
The Foundation provides Debian and Arch Linux ARM distributions for
download, and promotes Python as the main programming language, with support for BBC
BASIC, C,C++, Java, Perl, Ruby, and Squeak.
The Raspberry Pi hardware has evolved through several versions that feature
variations in memory capacity and peripheral-device support.
This block diagram depicts models A, B, A+, and B+. Model A, A+, and Zero lack
the Ethernet and USB hub components. The Ethernet adapter is connected to an additional
USB port. In model A and A+ the USB port is connected directly to the SoC. On
model B+ and later models the USB/Ethernet chip contains a five-point USB hub, of which
four ports are available, while model B only provides two. On the model Zero, the USB port
is also connected directly to the SoC, but it uses a micro USB (OTG) port.
Features include:
Finally, if you have an sd larger than 1GB, grow the partition with gparted (first move the
swap partition at the end).
You will have to reconfigure your timezone after the first boot: dpkg-reconfigure tzdata
PuTTY
It is a free and open-source terminal emulator, serial console and network file transfer
application. It supports several network protocols, including SCP, SSH, Telnet, rlogin,
and raw socket connection. It can also connect to a serial port.
PuTTY was originally written for Microsoft Windows, but it has been ported to various
other operating systems.
The network communication layer supports IPv6, and the SSH protocol supports the
delayed compression scheme. It can also be used with local serial port connections.
PuTTY comes bundled with command-line SCP and SFTP clients, called "pscp" and
"psftp" respectively.
If we connect to the Raspberry Pi with SSH or a remote desktop application a lot, WiFi is
actually one of the slowest and least reliable ways to connect to the Internet. A direct ethernet
connection is much faster and a lot more stable. By connecting to the Pi directly from the
laptop or desktop with an ethernet cable we bypass our local network, and don't have to
sharing bandwidth with other computers on the same network. It also allows us to connect to
the Pi when were outside of our home network.
What were going to do is assign a static IP address to the ethernet port of the Pi. This address
will depend on the IP address of the ethernet adapter on the computer we will be connecting
to the Pi from.
Find your Ethernet Adapters IP Address
First, we need to find out the IP address of the ethernet adapter on the computer you will be
accessing the Pi from.
Access the Network Connections window by right clicking on the Windows icon in the task
bar (Windows 8), or through the Control Panel in earlier versions of Windows. Then right
click on the Ethernet connection and select Properties:
Scroll down the list and select Internet Protocol Version 4 (TCP/IPv4), then click the
Properties button:
If Use the following IP address is selected, take note of the IP address. In this case its
10.0.0.6.
If Obtain an IP address automatically is selected, we will need to find
your autoconfiguration IPv4 address usingipconfig in the Windows Command Prompt:
Skip this step if you found the IP address of your ethernet adapter in the step above.
The autoconfiguration IPv4 address wont be displayed unless something is connected to the
ethernet adapter of your laptop/desktop computer, so plug your Pi into your computer with an
ethernet cable, and power it up.
Now we will need to access the Windows command prompt. Either search for it in the Start
menu, find it in the Control Panel, or right click on the Windows icon in the task bar:
Scroll down to see the configuration settings of your Ethernet adapter, which should say
something like Ethernet adapter Ethernet:
The next step is to find out your default gateway IP. This is the local IP address of our
network router. Computers on your network use it to communicate with the router and access
the internet.
Power up and log into your Raspberry Pi via WiFi or ethernet, then enter route '-ne' at the
command prompt to see the network routing information:
Under the Gateway column, we can see your Default Gateway IP (10.0.0.1) for each
interface (Iface) ethernet (eth0) and WiFi (wlan0). Write down the default gateway IP.
Now we need to find out the IP addresses of the domain name servers the Pi uses to
find websites on the internet. We power up the Pi and log in to the command prompt, then
enter cat /etc/resolv.conf:
Copy these IP addresses to a text editor on the PC or write them down for later.
Now were ready to configure the network settings on the Pi and set up our static IP address.
interface eth0
static ip_address=169.254.81.99
static routers=10.0.0.1
static domain_name_servers=75.75.75.75 75.75.76.76 2001:558:feed::1 2001:558:feed::2
o static ip_address= This will be the static IP address we use to SSH or remotely
connect to our Pi. We now take the IP address of our computers ethernet adapter (found
in the steps above), and change the last number to any other number between 0 and 255.
o static routers= This is the default gateway IP we found above.
o static domain_name_servers= These are the IPs we found in the /etc/resolv.conf file
above. Separate each IP with a single space.
The /etc/dhcpcd.conf file should look like this after we have put in our own IP addresses:
Note: We have also configured a static IP for my WiFi (wlan0) connection in the image
above.
After we have added the code and replaced the IP addresses, press Ctrl-X and Y to exit and
save the /etc/dhcpcd.conf file.
Now reboot the Pi, and plug an ethernet cable from the Pi directly to the laptop or desktop.
Open PuTTY (or another SSH client) and log in with the static ip_address address we have
created above:
Now we test to make sure that the Pi is able to access the internet by pinging Google.
Enter sudo ping www.google.com at the command prompt:
If the connection is successful, well see that packets have been sent and received. If the
connection is unsuccessful, we will get a Network is unreachable error:
Interfacing of webcam as an audio input device
cat /proc/asound/cards : will give the list of connected devices
After connecting webcam we can change the configuration of input devices by giving the
following commands :
alsamixer
We can change index of input device in the options and we can control the gain of the
devices.
Now we can verify the recorded audio by playing it back using the following cammand :
aplay test.wav
Installation of Linux Packages
Linux commands
This package contains files required for developing software that makes
use of libasound2, the ALSA library.
sudo reboot
VERIFICATION
Now update library paths for installed libraries and packages
cd ~/
export LD_LIBRARY_PATH=/usr/local/lib
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
Building Sphinxbase
cd ~/
go to root folder
wget
http://sourceforge.net/projects/cmusphinx/files/sphinxbase/5prealpha/sphi
nxbase-5prealpha.tar.gz
Building PocketSphinx
cd ~/ : go to root folder
wget
http://sourceforge.net/projects/cmusphinx/files/pocketsphinx/5prealpha/p
ocketsphinx-5prealpha.tar.gz
download pocketsphinx tar ball using :
cd ./pocketsphinx-5prealpha
Results
Basic Setup of the Webcam and Raspberry Pi