Analog Inputs for Raspberry Pi Using the MCP3008
Created by Mikey Sklar

Guide Contents Guide Contents Overview Connecting the Cobbler to a MCP3008 To follow this tutorial you will need Why we need an ADC Wiring Diagram Necessary Packages Python Script Run It 2 3 4 4 4 5 7 9 12

Teaching the Raspberry Pi how to read analog inputs is easier than you think! The Pi does not include a hardware analog to digital converter, but a external ADC (such as the MCP3008 (http://adafru.it/856)) can be used along with some bit banged SPI code in python to read external analog devies. Here is a short list of some analog inputs that could be used with this setup. potentiometer (http://adafru.it/356) photocell (http://adafru.it/161) force sensitive resistor ( FSR ) (http://adafru.it/166) temperature sensor (http://adafru.it/165) 2-axis joystick (http://adafru.it/512) This guide uses a potentiometer to control the volume of a mp3 file being played, but the code can be used as the basis for any kind of analog-input project

Connecting the Cobbler to a MCP3008 To follow this tutorial you will need MCP3008 DIP-package ADC converter chip (http://adafru.it/856) 10K trimer (http://adafru.it/356) or panel mount potentiometer (http://adafru.it/562) Adafruit Pi Cobbler (http://adafru.it/914) - follow the tutorial to assemble it Half (http://adafru.it/64) or Full-size breadboard (http://adafru.it/239) Breadboarding wires (http://adafru.it/aHz) And of course a working Raspberry Pi with Internet connection

Why we need an ADC
The Raspberry Pi computer does not have a way to read analog inputs. It's a digital-only computer. Compare this to the Arduino, AVR or PIC microcontrollers that often have...

...Running head: THE CRUEL CONCLUSION OF REALITY IN ‘ARABY’ AND ‘THE RASPBERRY BUSH’
The Cruel Conclusion of Reality in ‘Araby’ and ‘The Raspberry Bush’
October 8th 2013
ENGL 2P56
The Cruel Conclusion of Reality in ‘Araby’ and ‘The Raspberry Bush’
Every now and then, people get caught up in the hype of things; there is not a person on the planet immune to it. A person’s expectations of certain scenarios and the emotion put into objects and said situations can lead to disappointment, frustration, and feelings of loss. Reality comes creeping around the corner and ends up hitting the naïve individual with an unfortunate recognition. Humanity comes with a whole lot of emotions and those emotions get the better of us from time to time. I think this is evident in two short stories, the first being “Araby” by James Joyce, the second being “The Raspberry Bush” by Sheila Heti. In both stories, readers alike can see clear themes of disillusionment, cruel realization, and each protagonist is swallowed up in despair as a result of placing their emotions into inanimate and idealized expectancy. Throughout this essay, we will explore such themes further, we will analyze and conduct an investigation into which story proves to be more effective when crossing their overall meaning of human and cultural concerns provided by the author’s strategy. I will also make an assessment from my...

...π (sometimes written pi) is a mathematical constant whose value is the ratio of any circle's circumference to its diameter in the Euclidean plane; this is the same value as the ratio of a circle's area to the square of its radius. It is approximately equal to 3.14159265 in the usual decimal notation. Many formulae from mathematics, science, and engineering involve π, which makes it one of the most important mathematical constants.
π is an irrational number, which means that its value cannot be expressed exactly as a fraction m/n, where m and n are integers. Consequently, its decimal representation never ends or repeats. It is also a transcendental number, which implies, among other things, that no finite sequence of algebraic operations on integers (powers, roots, sums, etc.) can be equal to its value; proving this was a late achievement in mathematical history and a significant result of 19th century German mathematics. Throughout the history of mathematics, there has been much effort to determine π more accurately and to understand its nature; fascination with the number has even carried over into non-mathematical culture.
Probably because of the simplicity of its definition, the concept of π has become entrenched in popular culture to a degree far greater than almost any other mathematical construct. It is, perhaps, the most common ground between mathematicians and non-mathematicians. Reports on the latest, most-precise calculation of π (and related...

...The History of Pi
The History of Pi
Most individuals who have a general mathematical education that touches on the basics of geometry commonly know pi. The definition of pi is the ratio of the circumference to the diameter of the circle (Smoller, 2001). The majority of the population, however, does not realize the history associated with the symbol, which not only spans throughout the centuries but throughout the millenniums. The Babylonians, Egyptians, Archimedes of Syracuse, Leonardo of Pisa, Francois Viete, Leonhard Euler, Asian mathematicians such as Liu Hiu, Tsu Ch’ung-Chih, Arya Bhatta, Gottfried Leibniz, Isaac Newton, William Jones, John Machin. George Buffon and Srinivasa Ramanujan, have all played a role in the enriched past of this important mathematical symbol.
The ancient Babylonians dates back to the 18th century BCE and reigned in Mesopotamia. The Babylonia, even though it declined drastically in the 17th century, existed until 539 when the Persians consumed Babylonia (Kjeilen, 2009). During this time, they made magnificentstructures with archways that held religious emphasis. The Babylonians used a developed mathematical system, which included six as the root number as opposed to 10 which are commonly used today (Kjeilen, 2009). Even though the Babylonians has a variation on their mathematical system, they calculated the area of a circle by taking three times the square of its radius. One old...

...What is π?
Webster's Collegiate Dictionary defines π as "1: the 16th letter of the Greek alphabet... 2 a: the symbol pi denoting the ratio of the circumference of a circle to its diameter b: the ratio itself: a transcendental number having a value to eight decimal places of 3.14159265"
A number can be placed into several categories based on its properties. Is it prime or composite? Is it imaginary or real? Is it transcendental or algebraic? These questions help define a number's behavior in different situations. In order to understand where π fits in to the world of mathematics, one must understand several of its properties: π is irrational and π is transcendental.
The History of π
In the long history of the number π, there have been many twists and turns, many inconsistencies that reflect the condition of the human race as a whole. Through each major period of world history and in each regional area, the state of intellectual thought, the state of mathematics, and hence the state of π, has been dictated by the same socio-economic and geographic forces as every other aspect of civilization. The following is a brief history, organized by period and region, of the development of our understanding of the number π.
In ancient times, π was discovered independently by the first civilizations to begin agriculture. Their new sedentary life style first freed up time for mathematical pondering, and the need for permanent shelter necessitated the...

...History of Pi
There are many people who have discovered and proved what pi is. As time goes on people discover more and more of the seemingly random numbers. Four of the people who proved pi are the Liu Hui, Archimedes of Syracuse, James Gregory, and the Bible.
The first proof I will be talking about is Liu Hui’s. Liu Hui was a Chinese mathematician whose method for proving pi was to find the area of a polygon inscribed in a circle. When the number of sides on the inscribed polygon increased, its area became closer to the circumference of a circle and pi. For finding the side length of an inscribed polygon Liu Hui used a simple formula. (13Ma3)
To find the side length of an inscribed polygon of 2n sides, if the side length of a polygon with n sides is known he used the following formula:
In this formula k stands for a temporary variable, and Sn stands for the side length of an inscribed polygon with n sides. (13Ma3)
We will start with a hexagon inside of a circle. The radius of the circle is one, the area is pi. The side length of the hexagon is 1. To calculate the next k value, all we need to do is do an addition and a square root like in the following:
The area of a regular polygon is A=1/2nsa. The n stands for number of sides, s stands for side length, and a stands for apothem. As the number of sides increases, the apothem becomes closer and closer to the radius so...

...Pi has always been an interesting concept to me. A number that is infinitely being calculated seems almost unbelievable. This number has perplexed many for years and years, yet it is such an essential part of many peoples lives. It has become such a popular phenomenon that there is even a day named after it, March 14th (3/14) of every year! It is used to find the area or perimeter of circles, and used in our every day lives. Pi is used in things such as engineering and physics, to the ripples created when a drop of water falls into a puddle, Pi is everywhere. While researching this topic I have found that Pi certainly stretches back to a period long ago. The history of Pi was much more extensive than I originally imagined. I also learned that searching for more numbers in Pi was a major concern for mathematicians in which they put much effort into finding these lost numbers. The use for Pi was also significantly larger than I originally anticipated. I was under the impression that it was used for strictly mathematicians which is entirely not true. This is why Pi is so interesting.
The history of Pi dates back to a much later period than I thought. Ancient Egypt and Babylon are one of the first places that Pi was first founded. When discovered it showed that these ancient Pi values were within one percent of it's actual...

...Pi is an ancient and wonderful Number to the World of Mathematics invented with the Geometrical structure Circle.
CIRCLE
It is felt that the creation of the Circle is not created by the man himself but came through the inspiration of Nature itself. The shape of Sun, Full Moon, Eyes are some examples for it.
Some basic things :
There are 3 major parts to remember.
Radius : The straight line drawn to the Circumference of the Circle from the Centre point.
Diameter : Diameter is the straight line drawn from one point of the circumference to another point of the circumference through the center point (Origin) .
Circumference:
Circumference is the curved line drawn from the origin of the Circle having equal radii.
It is evident that so many people from ancient period tried to understand the nature of a Circle.
They found the relationship between the Circumference and radius of the Circle.
Circumference increases with the increase in Radius or Diameter
Pi is the ratio of Circumference of the Circle to its Diameter .
The value of Pi (Its value is Constant) is very essential factor to know the Area of a Circle.
Finding the Value of Pi is not a simple thing because the measurement of the Circumference is not so easy.
So many people tried to know the value of Pi by
different mathematical methods.
It is believed that the Egyptians and...

...Before I talk about the history of Pi I want to explain what Pi is. Webster's Collegiate Dictionary defines Pi as "1: the 16th letter of the Greek alphabet... 2 a: the symbol pi denoting the ratio of the circumference of a circle to its diameter b: the ratio itself: a transcendental number having a value to eight decimal places of 3.14159265" A number can be placed into several categories based on its properties. Is it prime or composite? Is it imaginary or real? Is it transcendental or algebraic? These questions help define a number's behavior in different situations. In order to understand where Pi fits in to the world of mathematics, one must understand several of its properties pi is irrational and pi is transcendental.
A rational number is one that can be expressed as the fraction of two integers. Rational numbers converted into decimal notation always repeat themselves somewhere in their digits. For example, 3 is a rational number as it can be written as 3/1 and in decimal notation it is expressed with an infinite amount of zeros to the right of the decimal point. 1/7 is also a rational number. Its decimal notation is 0.142857142857…, a repetition of six digits. However, the square root of 2 cannot be written as the fraction of two integers and is therefore irrational.
For many centuries prior to the actual proof, mathematicians had thought that...