Friday, November 8, 2013

LM35(temparature sensor) with arduino

LM35 is the temparature sensor  it give the values those are the analog values .
here i connected the LM 35 with arduino on the analog port.
it is working properly and giving the values..
for pin discription see below the code.

/*

  distance sensor]
 VCC to arduino 5v GND to arduino GND
temp sensor output to Arduino pin 15
 More info at: http://anildurgam.blogspot.in/


sponsred by the potentiallabs
visit us
http://potentiallabs.com/
http://potentiallabs.com/cart


 */


float temp;
int tempPin = 15;

void setup()
{
  Serial.begin(9600);
  pinMode(tempPin ,INPUT);
  Serial.print("serial monitor is ready...waiting for the results");
}

void loop()
{
  temp = analogRead(tempPin);
  temp = temp * 0.48828125;
  Serial.print("TEMPRATURE = ");
  Serial.print(temp);
  Serial.print("*C");
  Serial.println();
  delay(1000);



}

raspberry pi intro



The following tables give the mapping of the Raspberry Pi GPIO Pins to the GPIO connector in relation to the pin numbers and the physical location on the connector. This is a representation of the GPIO connector as viewed looking at the board from above, with the USB power at the top and the GPIO to the top-right of the board.
If using the connector pin numbering, then note that Pin 1 on the connector is the 3.3v supply. Pin 2 is the 5V supply, and pin 26 is marked SPI CE1 below.
P1: The Main GPIO connector:
wiringPi
Pin
BCM
GPIO
NameHeaderNameBCM
GPIO
wiringPi
Pin
3.3v1 | 25v
8R1:0/R2:2SDA03 | 45v
9R1:1/R2:3SCL05 | 60v
74GPIO77 | 8TxD1415
0v9 | 10RxD1516
017GPIO011 | 12GPIO1181
2R1:21/R2:27GPIO213 | 140v
322GPIO315 | 16GPIO4234
3.3v17 | 18GPIO5245
1210MOSI19 | 200v
139MISO21 | 22GPIO6256
1411SCLK23 | 24CE0810
0v25 | 26CE1711
wiringPi
Pin
BCM
GPIO
NameHeaderNameBCM
GPIO
wiringPi
Pin
  • Board Revisions: Please note the differences between board revisions 1 and 2 (R1 and R2 above)
P5: The auxilliary GPIO connector present on Rev. 2 boards only:
wiringPi PinBCM GPIONameHeaderNameBCM GPIOwiringPi Pin
5v1 | 23.3v
1728GPIO83 | 4GPIO92918
1930GPIO105 | 6GPIO113120
0v7 | 80v
wiringPi
Pin
BCM
GPIO
NameHeaderNameBCM
GPIO
wiringPi
Pin
Note also that the P5 connector is designed to be used from the underside of the Pi – ie. you solder on the top of the Pi board to install the connector! If you are using it from the top, then you need to mirror the diagram above.
Each side has three columns. The outermost column, headed wiringPi Pin refers to the pin number in the wiring Pi code. The middle one, headed BCM GPIO refers to the pin number of the BCM2835 chip, an this is the pin number used when addressing the GPIO using the/sys/class/gpio interface. The innermost column, Name is the name of the function of the pin.
The central column contains the pin numbers on the header on the board. Pin 1 is the 3.3v power supply on the P1 connector (Rev. 1 and Rev. 2 boards), and Pin 1 is the 5v power supply on the P5 connector on Rev. 2 boards only.
Note: This page was edited (again!) on the 19th of June 2012 to fix the mistakes of the earlier edit. I have double-checked this against the schematic and by building a set of 15 LEDs and connecting it all up.
Raspbery Pi driving all 17 GPIO pins
Raspbery Pi driving all 17 GPIO pins

The photo shows a static shot of a Raspberry Pi driving all 17 GPIO pins with LEDs. The program actually cycles up from Pin 0 to Pin 16 so I can check the exact pin ordering…

python class topic video