Presentation is loading. Please wait.

Presentation is loading. Please wait.

Infrared Proximity Sensors & Liquid Crystal Display Instructor Dr Matthew Khin Yi Kyaw.

Similar presentations


Presentation on theme: "Infrared Proximity Sensors & Liquid Crystal Display Instructor Dr Matthew Khin Yi Kyaw."— Presentation transcript:

1 Infrared Proximity Sensors & Liquid Crystal Display Instructor Dr Matthew Khin Yi Kyaw

2 What is proximity sensor? It is able to measure and detect the nearby object, within the specified range. The output of the sensor is analog. The analog output varies from 3.1V at 10cm to 0.3V at 80cm. The input is from 4.5 to 5.5V.

3 1.Vout 2.Ground 3.supply 1 2 3 GP2Y0A21K.

4 Code 1 int sensorP=A0; int value=0; void setup( ) { Serial.begin(9600); } void loop() { value= analogRead(sensorP); Serial.println(value1); delay(100); }

5 Download the sharp distance sensor library source from http://code.google.com/p/gp2y0a21k-library Place the DistanceGP2Y0A21YK folder in Arduino 1.0 “libraries” folder. Open file Examples Distance centimeter

6 What is Liquid Crystal Display?

7

8 Liquid Crystal Display and Keypad Place the LCD and keypad shield on top of the Arduino, check the pin numbers to mount it properly. Change the port number as Liquid Crystal lcd (8,9,4,5,6,7) Implement the Code-4 compile, download how the input keypad works Connect the Proximity Sensor with the Arduino on Analog A2. Read the distance sensor reading and display it on the LCD. The first line should display “Distance Sensor” The second line should display Range= cm

9 software Arduino LCD displaly Hello World Copy code 4 from handout

10 References 1.http://www.acroname.com/robotics/info/articles/sharp/sharp.html#e5 2. http://en.wikipedia.org/wiki/Proximity_sensor. 3. http://code.google.com/p/gp2y0a21yk-library/. 4. http://acroname.com/robotics/info/articles/irlinear/irlinear.html. 5. http://arduino.cc. 6. \Arduino Programming Notebook" by - by Brian W. Evans. 7. Beginning Android ADK with Arduino by Mario Bohmer 8. http://arduino.cc/en/uploads/Main/arduino_Uno_Rev3-02-TH.zip. 9. http://arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf. 10. http://arduino.cc/en/Main/ArduinoBoardUno. 11. Computational Principles of Mobile Robotics by from Dudek and Jenkin.

11


Download ppt "Infrared Proximity Sensors & Liquid Crystal Display Instructor Dr Matthew Khin Yi Kyaw."

Similar presentations


Ads by Google