Skip to main content

Posts

Showing posts from April, 2017

Sensing Light

A Shopping List of Parts 1. LDR: cost less than ₹10 2. Resistor: 2.2KΩ , less than ₹1 3. Capacitor: 300nF, costs less than less than ₹5 4. Full size Breadboard: ₹ 80 5. Jumper wires: Female to female, male to female This work is only costs less than ₹100 if you are an electronic hobbyist. Since an electronic hobbyist have atleast the components like LDR, breadboard, jumper wires etc. on his hand. LDR LDR LDR is also known as Light Dependent Resistor or Photo Resistor or Photoconductive Cell or Photo Detector. The resistance of Photoconductive Cell decreases as the intensity of light increases. Photo Detectors are made up of semiconducting materials which possesses energy band equivalent to the order of that of photon. Cadmium Sulfide (CdS) is a potential candidate of photo detector whose Forbidden Energy Gap (FEG) ≅ energy of light. You can clearly see the CdS tracks on the top of LDR. Circuit Circuit Diagram Connect 3.3v Raspberry Pi pin(Pin 1)

More Useful Raspbian Commands

Make and Extract tar files The tar command is an archiving utility that enables you to combine files and directories into a single file (like an uncompressed zip file). This file can then be compressed to save space. To archive and compress a directory of files, such as /var , use the following: pi@raspberry ~ $ tar cvfz var_backup.tar.gz /var In the following commands (c) means new archive, (v) means verbosely list files, (z) means compress with gzip, (r) means append files to the end if tar archive (j) option tells tar to read or write archives using the bzip2 compressor, and (f) means archive name follows. You might also see .tar.gz represented as .tgz. •  tar cvfz name.tar.gz /var This command compress with gzip form. •  tar cvfj name.tar.bz2 /var Compress with bzip2 compression (typically a longer delay, but smaller, file). Enter all commands in this table on a single line. • tar cvfJ name.tar.xz /var Compress with xz file format (used in .deb package files

Useful Raspbian Commands

more command You can use more command instead cat command to view the contents of a file. For example: more /etc/network/interfaces You can now see catalog of your network interfaces file on the terminal window. Get the calender The cal command displays a text based calender on your terminal. But your Raspberry Pi has no real time clock you should connect to Internet for accessing correct date. What is my Disk Usage? One advantage that Windows and Macintosh systems have over Unix is that they make it easy to find out how much disk space you’re using and how much remains available. On Windows, each partition of your hard disk says itself about disk space used. Like a close-mouthed police informant, Unix never volunteers any information, so you need to learn two new commands. The du (disk usage) command is used to find out how much disk space is used; the df (disk free) command is used to find out how much space is available. du du -h /opt or du -

Making Commands Powerful

pipes and tees As I concern as these commands are most powerful Linux commands. You might heard about pipes and tees used for plumbing works. The tees and pipes used for diverge water into different direction. The pipe and tee commands will do the same job for you. The pipes and tees are used for take the output one command and apply it on another command. pipe Pipe A pipe allows output from one command to be used as the input for another command. The pipe symbol is vertical line  |  . For example: To show first ten entries of ls command it can be pipe through head command like ls | head . If your working directory is Desktop, cat /etc/network/interfaces | network_interfaces.txt will create a new text file named network_intetfaces on your Desktop also it make a catalog on your terminal window. You can also try this command on other directories. tees Tee Plumbers are using tees to diverge water flow in different directions. In Linux we are using tees to mak

Moving around Filesystem

The most basic part of using a command interpreter, such as bash, is to be able to move around the Linux filesystem. It is important to understand how bash lets you represent directories. This is done in two different ways: using absolute paths and relative paths. Absolute Paths An absolute path is a path that describes the location of a file or folder starting from / (root). This is easy to spot as it will always start with /. An example of an absolute path is /home/pi/Desktop. This path is the folder that contains all the items on your desktop. Relative Paths A relative path is a path to the file or folder that is described based on where you are in the filesystem. An example of a relative path is ../Desktop. This means that a folder called Desktop is stored in a folder that is one level above the one you are in. There are several special paths that you should know of in bash, as follows: Path Description / This is the root of the Linux file

Beginning Raspbian Commands

LXTerminal LXTerminal is the default terminal emulator that is included with Xfce. LXTerminal allows you to run console applications inside the graphical environment of Xfce and acts as a bridge between you and your Raspberry Pi, similar to what Xfce does. We will discuss using LXTerminal in more detail in the following... Multiple instances of LXTerminal can be run, which allow you to run several terminal applications at the same time. These instances can be in their own windows or in a tab. Raspbian LXTerminal The Console Behind the pretty graphical interfaces of a Linux-based operating system such as Raspbian, is the console. The console is the most basic way of communicating with the innards of the Raspbian operating system. The console's history started at the very beginning of computing where the interface to a computer was a keyboard and a teletype machine. At that time, operators would type a command and the result would be printed in front of t

More About Linux System Administration

The Terminal and the GUI As in OS X and Windows, there are typically two main ways to achieve a given goal in Linux: through the GUI and through the command line (known in Linux parlance as the console or the terminal). The appearance of various Linux distributions can be quite different, depending on the desktop environment in use. In this book, the recommended Raspbian distribution is used, but most of the commands you will be learning are entered at the terminal and are typically the same across all distributions. Where other distributions differ, you will be given alternative methods of achieving the same goals. Introducing Raspbian Raspbian is the name given to a customised variant of the popular Debian Linux distribution. Debian is one of the longest-running Linux distributions and concentrates on stability, high compatibility, and excellent performance even on modest hardware—making it a great partner for the Raspberry Pi. Raspbian takes Debian as its base

Linux an Overview

The majority of modern Linux distributions are user friendly, with a graphical user interface (GUI) that provides an easy way to perform common tasks. It is, however, quite different to both Windows and OS X, so to get the most out of your Raspberry Pi, you first need a quick primer on using the operating system. As briefly explained in previous posts, Linux is an open source project that was originally founded to produce a kernel that was free for anyone to use. The kernel is the heart of an operating system, and it handles the communication between the user and the hardware. Although it rightly refers only to the kernel, the term Linux is often used to refer to a collection of different open source projects from a variety of companies. These collections come together to form different flavours of Linux known as distributions. The original version of Linux was combined with a collection of tools created by a group called GNU. The resulting system, known as GNU/Linux,