Installing Important library in Raspberry Pi 3 – Part 1

Displaying Current SD Card Usage

Before installing the library in our Raspbian SD card we have to  Free Up Some Space On our Raspbian SD Card so we remove unnecessary library (Wolfram & LibreOffice). for free the space we have to follow following steps.

Step 1-To see how much space is being used on your SD card you can run the following command  open your LXTerminal and type the below command.

df -h

Typing df -h shows you your disk usage. If you look at the first entry /dev/root/ it shows 4. 3G used and 9.7G available.This will give an output like below image

p1

Step 2Now to free up some space remove the Wolfram Engine type following command.

sudo apt-get purge wolfram-engine

p2

Step 3Now to free up some more space remove LibreOffice type the following command.

sudo apt-get autoremove --purge libreoffice*

Step 4 After removing these file we have Clean up cache of the file. to remove the cache type following command

sudo apt-get clean

Step 5 After Removing and clear cache we have to Remove unused dependencies
This command removes packages that are no longer used/required.

sudo apt-get autoremove

p4

So after removing these two bulky packages and cleaning up, it looks like we’ve free up almost 1.4 GB of SD card space. That was a very helpful for us in future.

Installing the library

Please note that,your Raspberry Pi should be connected to the network/Internet when using the command apt-get to install the library other wise you will get an error.

First, update your system’s package list by entering the following command in LXTerminal.

sudo apt-get update

Upgrade all your installed packages to their latest versions with below command.

sudo apt-get upgrade

p5

Now reboot the system to apply the changes.

sudo reboot

After rebooting open the LXTerminal.

Run the following command to install the raspberry pi gpio for  python.

sudo apt-get install python.rpi.gpio

Audio install

If we want to use sound from our Raspberry Pi’s (RPi) Audio Output 3.5mm jack.  we’ll need to get audio drivers working on Audio .  I’m choosing the Advanced Linux Sound Architecture (ALSA) drivers because its widely supported and because ALSA not only provides audio but  Musical Instrument Digital Interface (MIDI) functionality to Linux.   I’ll also be using the popular command line MP3 players, mpg321 and the WAV player that comes with ALSA.To get things going, I installed ALSA, a MP3 tools, and a WAV to MP3 conversion tool via the following commands

To install ALSA driver type the following command in LXTerminal.

sudo apt-get install alsa-utils

To install MP3 player driver type the following command in LXTerminal.

sudo apt-get install mpg321

To install WAV to MP3 conversion tool type the following command in LXTerminal.

 sudo apt-get install lame

To Enable the Sound Module in raspberry pi 3 type the following command.

sudo modprobe snd-bcm2835

To Enable the Audio output in 3.5 mm audio jack in raspberry pi3 type the following command.

amixer cset numid=3 1

To Enable the Audio output  in HDMI of  raspberry pi3 type the following command.

amixer cset numid=3 2

To control the volume of raspberry pi 3 type the following code.

amixer cset numid=1  80%

It will increase the volume up to 80% to make it 100% type the below code.

amixer cset numid=1  100%

How to install Xbee library for python raspberry pi 3

The ZigBee protocol makes it possible to span a variety of network topologies ranging from simple connections that exist between two partners to large networks consisting of tens of thousands of participants to install the xbee library we have to download the  xbee file extract it and put it on Desktop of raspberry pi 3.

now type the below command to install the xbee module.

cd Desktop

now type the version which you have extracted in my case its( 2.3.2)

cd XBee-2.3.2

now type the below command line to install the library of xbee.

sudo python setup.py install

The initial Setup of raspberry pi3 is completed in next topic we will cover I2C,SPI and PIL installing in raspberry pi 3.

Leave a comment

Blog at WordPress.com.

Up ↑

Design a site like this with WordPress.com
Get started