Your SlideShare is downloading. ×
0
Sharp sensor
Sharp sensor
Sharp sensor
Sharp sensor
Sharp sensor
Sharp sensor
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Sharp sensor

109

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
109
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  1. R-tist
  2. R-tist12/6/2012 i-SKY TECHNOLOGIES 2
  3. SHARP SENSOR  IN AVR ADC IS IS INBUILT SO THERE IS NO NEED OF EXTERNAL CIRCUIT.  THIS SHARP SENSOR HAS RANGE OF ONLY 10 TO 80 CM.  WHEN IT IS OUT OF RANGE THAN IT GIVE RANDOM VALUE OF DISTANCE.  DUE TO THIS IN PROGRAM WE USE 0 VALUE WHEN IT IS OUT OF RANGE.R-tist 12/6/2012 i-SKY TECHNOLOGIES 3
  4. FORMULA FOR DISTANCECALCULATIONsensorValue = (6787 / (sensorValue - 3)) - 4;12/6/2012 R-tist i-SKY TECHNOLOGIES 4
  5. PROGRAM TO SHOW DIS. ONSERIAL PORT  #include <LiquidCrystal.h>  void loop() {  const int analogInPin = 0;  sensorValue =  float sensorValue = 0; analogRead(analogInPin);  LiquidCrystal lcd(4, 7, 8, 9,  lcd.setCursor(0, 0); 12, 13);  if(sensorValue<80)  void setup() {  sensorValue=0;  lcd.begin(16, 2);  else  }  sensorValue = (6787 / (sensorValue - 3)) - 4;  lcd.print(sensorValue);  lcd.print(" ");  delay(100);  }12/6/2012 R-tist i-SKY TECHNOLOGIES 5
  6. Q-: WRITE A PROGRAM TO DEMONSTRATE WHEN DISTANCE OF OBJECT IS LESS THAN 40 CM THAN RED LED OF RGB IS GLOW WHEN IT IS 40-50 GREEN LED IS GLOW AND WHEN IT IS GREATER THAN 50 BLUE LED GLOW12/6/2012 R-tist i-SKY TECHNOLOGIES 6

×