{"id":28018,"date":"2019-12-17T18:15:30","date_gmt":"2019-12-17T10:15:30","guid":{"rendered":"\/blog\/?p=28018"},"modified":"2020-06-22T15:57:12","modified_gmt":"2020-06-22T07:57:12","slug":"ir-proximity-sensor-for-easy-arduino-distance-measuring","status":"publish","type":"post","link":"https:\/\/www.seeedstudio.com\/blog\/2019\/12\/17\/ir-proximity-sensor-for-easy-arduino-distance-measuring\/","title":{"rendered":"IR Proximity Sensor for Arduino Distance Measuring"},"content":{"rendered":"\n<p>Proximity sensors are commonly used today alongside Arduino for many applications, ranging from distance measurement, object detection, to heat emission measurement. Hence, picking one that&#8217;s easily connectable, accurate, and reliable is very much important for fulfilling your intended usages.<\/p>\n\n\n\n<p>Sounds like it&#8217;s too much to handle? Not to worry, this blog will introduce a SHARP proximity sensor and discuss how to easily connect it with your Arduino for a plethora of applications! <\/p>\n\n\n\n<p>Alongside the introduction and Arduino guide, I&#8217;ll be showcasing some projects you can try as well!<\/p>\n\n\n\n<p><strong>And yes, for today&#8217;s guide, you will not need jumper wires nor breadboard because of the plug and play capability provided by <a href=\"https:\/\/www.seeedstudio.com\/category\/Grove-c-1003.html\">Grove System<\/a> \ud83d\ude42<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>The <a href=\"https:\/\/www.seeedstudio.com\/Grove-80cm-Infrared-Proximity-Sensor.html?utm_source=blog&amp;utm_medium=blog\">Grove &#8211; 80cm Infrared Proximity Sensor<\/a><\/strong><\/h2>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/media-cdn.seeedstudio.com\/media\/catalog\/product\/cache\/ab187aaa5f626ad16c8031644cd2de5b\/h\/t\/httpsstatics3.seeedstudio.comimagesproductproximity.jpg\" alt=\"\" width=\"350\" height=\"263\"\/><\/figure><\/div>\n\n\n\n<p>Based on the SHARP GP2Y0A21, this IR proximity sensor is a popular choice that I&#8217;m recommending for anyone that&#8217;s looking for accurate distance measuring beyond your alternatives. <\/p>\n\n\n\n<p>Packed in a small package with low power consumption, this IR proximity sensor allows for continuous distance reading with a range of 10cm to 80cm! <\/p>\n\n\n\n<p>This sensor is quite small and uses a tiny connector called the Japan Solderless Terminal (JST) connector. These connectors have three wires: Ground, VCC, and Output. Because the sensor fire continuously and don&#8217;t need any clock to initiate a reading, it is easy to interface with any microcontroller. for the&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/www.seeedstudio.com\/Seeeduino-V4-2-p-2517.html\" target=\"_blank\">Seeeduino 4.2<\/a>, the wire converts the 3-wire to 4-wire so that it can be compatible with the twig interface of Grove.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Hardware Overview: Specifications<\/strong><\/h4>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"\"><tbody><tr><th>Item<\/th><th>Minimum<\/th><th>Typical<\/th><th>Maximum<\/th><\/tr><tr><th>Working Voltage<\/th><td>2.5V<\/td><td>5V<\/td><td>7V<\/td><\/tr><tr><th>Analog Output Voltage(80cm)<\/th><td>0.25V<\/td><td>0.4V<\/td><td>0.5V<\/td><\/tr><tr><th>Average Current Consumption<\/th><td>&#8211;<\/td><td>33mA<\/td><td>50mA<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>What makes this an attractive option?<\/strong><\/h4>\n\n\n\n<p style=\"background-color:#f4fbf2;color:#000000\" class=\"has-text-color has-background\"><strong>Small form factor<\/strong><\/p>\n\n\n\n<p>Built small for seamless applications, you wouldn&#8217;t have to worry if it doesn&#8217;t fit into the smallest project space you&#8217;re working with!<\/p>\n\n\n\n<p style=\"background-color:#f4fbf2;color:#000000\" class=\"has-text-color has-background\"><strong>Ease of Usage with Japanese Solderless Terminal (JST)<\/strong><\/p>\n\n\n\n<p>Since it uses a tiny connector called the JST, all you need to connect the proximity sensor with is a 3pin JST wire. This eliminates the need for many jumper wires and manually soldering it for pairing purposes!<\/p>\n\n\n\n<p style=\"background-color:#f4fbf2;color:#000000\" class=\"has-text-color has-background\"><strong>Cost-performance ratio<\/strong><\/p>\n\n\n\n<p>Compared to LIDAR which tends to be on the pricier side, the Grove -80cm Infrared Proximity Sensor offers a good cost-to-performance ratio, achieving a distance measurement range of 10cm to 80cm for only $13.90!<\/p>\n\n\n\n<p style=\"background-color:#f4fbf2;color:#000000\" class=\"has-text-color has-background\"><strong>Grove Interface <\/strong><\/p>\n\n\n\n<p>Grove? Grove system is Seeed very own initiative, mainly aimed at helping users like yourself to easily use different modules, sensors, and more through our plug and play system! <\/p>\n\n\n\n<p>We currently already hold more than 200 Grove modules, including other proximity sensor types for you to choose from!<\/p>\n\n\n\n<p>Don&#8217;t believe how easy pairing is made possible with Grove? Below shows a general proximity sensor vs the Grove &#8211; 80cm Infrared Sensor: <\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-2 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img decoding=\"async\" width=\"475\" height=\"387\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2019\/12\/grove-proximity-sensor.png\" alt=\"\" data-id=\"28025\" class=\"wp-image-28025\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/12\/grove-proximity-sensor.png 475w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/12\/grove-proximity-sensor-300x244.png 300w\" sizes=\"(max-width: 475px) 100vw, 475px\" \/><figcaption class=\"blocks-gallery-item__caption\">General proximity sensor setup with Arduino<\/figcaption><\/figure><\/li><li class=\"blocks-gallery-item\"><figure><img decoding=\"async\" width=\"518\" height=\"384\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2019\/12\/grove-proximity-sensor-2.png\" alt=\"\" data-id=\"28026\" data-link=\"\/blog\/?attachment_id=28026\" class=\"wp-image-28026\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/12\/grove-proximity-sensor-2.png 518w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/12\/grove-proximity-sensor-2-300x222.png 300w\" sizes=\"(max-width: 518px) 100vw, 518px\" \/><figcaption class=\"blocks-gallery-item__caption\">Grove &#8211; 80cm proximity sensor setup with Arduino<\/figcaption><\/figure><\/li><\/ul><\/figure>\n\n\n\n<p>Like how simple and less messy it is?<\/p>\n\n\n\n<p><strong>All you need is a&nbsp;<a href=\"https:\/\/www.seeedstudio.com\/Base-Shield-V2.html?utm_source=blog&amp;utm_medium=blog\">Grove Base Shield<\/a>&nbsp;alongside your Arduino and you\u2019re good to go! Switch to using grove today!<\/strong><\/p>\n\n\n\n<p><em>Interested to know more about Grove? You can head over to our <\/em><a href=\"http:\/\/wiki.seeedstudio.com\/Grove_System\/\"><em>wiki page!<\/em><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Proximity Sensor Arduino Guide<\/strong><\/h2>\n\n\n\n<p>If you like what you&#8217;ve seen so far with the Grove &#8211; 80cm Infrared Proximity Sensor, the following Arduino Guide will help you get started in no time!<\/p>\n\n\n\n<p>As mentioned, this proximity sensor is easy to use, all you need is the following:<\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-3 is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"210\" height=\"157\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2019\/12\/base-shield-6.jpg\" alt=\"\" data-id=\"28028\" data-link=\"\/blog\/?attachment_id=28028\" class=\"wp-image-28028\"\/><figcaption class=\"blocks-gallery-item__caption\"><a href=\"https:\/\/www.seeedstudio.com\/Base-Shield-V2.html?utm_source=blog&amp;utm_medium=blog\">Grove Base Shield<\/a><\/figcaption><\/figure><\/li><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"525\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2019\/12\/infrared-proximity-sensor.jpg\" alt=\"\" data-id=\"28029\" data-link=\"\/blog\/?attachment_id=28029\" class=\"wp-image-28029\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/12\/infrared-proximity-sensor.jpg 700w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/12\/infrared-proximity-sensor-300x225.jpg 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><figcaption class=\"blocks-gallery-item__caption\"><a href=\"https:\/\/www.seeedstudio.com\/Grove-80cm-Infrared-Proximity-Sensor.html?utm_source=blog&amp;utm_medium=blog\">Grove &#8211; 80cm Infrared Proximity Sensor<\/a><\/figcaption><\/figure><\/li><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"210\" height=\"157\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2019\/12\/seeeduino-v4.2-4.jpg\" alt=\"\" data-id=\"28030\" data-link=\"\/blog\/?attachment_id=28030\" class=\"wp-image-28030\"\/><figcaption class=\"blocks-gallery-item__caption\"><a href=\"https:\/\/www.seeedstudio.com\/Seeeduino-V4-2-p-2517.html?utm_source=blog&amp;utm_medium=blog\">Seeeduino V4.2<\/a><\/figcaption><\/figure><\/li><\/ul><\/figure>\n\n\n\n<p>Seeeduino is Seeed&#8217;s very own Arduino, built with relative advantages over the original version. The following boards are compatible as well:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Arduino Uno<\/li><li>Seeeduino V4.2<\/li><li>Arduino Mega \/ Seeeduino Mega<\/li><li>Seeduino LoraWan<\/li><li>Arduino Leonardo \/ Seeeduino Lite<\/li><li>Arduino 101<\/li><li>Arduino Due<\/li><li>Intel Edison<\/li><li>Linkit One<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Hardware Configurations<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Step 1:<\/strong> Connect the 3-pin connector to the sensor, and connect the 4-pin connector to Grove-Base shield&#8217;s A1 port<\/li><li><strong>Step 2:<\/strong> Connect Arduino\/Seeeduino via a USB cable<\/li><\/ul>\n\n\n\n<p><strong>It should look something like this after the above steps:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/SeeedDocument\/Grove-80cm_Infrared_Proximity_Sensor\/master\/img\/80cm_Infrared.jpg\" alt=\"\" width=\"358\" height=\"261\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Software configurations<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Step 1:<\/strong> Copy and paste code below to a new Arduino sketch<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>    #define IR_PROXIMITY_SENSOR A1 \/\/ Analog input pin that  is attached to the sensor\n    #define ADC_REF 5\/\/reference voltage of ADC is 5v.If the Vcc switch on the Seeeduino\n                     \/\/board switches to 3V3, the ADC_REF should be 3.3\n    float voltage;\/\/the sensor voltage, you can calculate or find the distance\n                    \/\/ to the reflective object according to the figures\n                    \/\/on page 4 or page 5 of the datasheet of the GP2Y0A21YK.\n\n    void setup()\n    {\n        \/\/ initialise serial communications at 9600 bps:\n        Serial.begin(9600);\n    }\n\n    void loop()\n    {\n        voltage = getVoltage();\n        Serial.print(\"sensor voltage  = \" );                       \n        Serial.print(voltage);\n        \/\/ wait 500 milliseconds before the next loop\n        delay(500);\n    }\n    \/****************************************************************************\/\n    \/*Function: Get voltage from the sensor pin that is connected with analog pin*\/\n    \/*Parameter:-void                                                       *\/\n    \/*Return:   -float,the voltage of the analog pin                        *\/\n    float getVoltage()\n    {\n        int sensor_value;\n        int sum;  \n        \/\/ read the analog in value:\n        for (int i = 0;i &lt; 20;i ++)\/\/Continuous sampling 20 times\n        {\n            sensor_value = analogRead(IR_PROXIMITY_SENSOR);\n            sum += sensor_value;\n        }\n        sensor_value = sum \/ 20;\n        float voltage;\n        voltage = (float)sensor_value*ADC_REF\/1024;\n        return voltage;\n    }<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Step 2:<\/strong> Upload the code<\/li><li><strong>Step 3: <\/strong>Open the Serial Monitor, you can calculate or find the distance to the reflective object according to the below figures<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/SeeedDocument\/Grove-80cm_Infrared_Proximity_Sensor\/master\/img\/Infrared_Proximity.jpg\" alt=\"\" width=\"402\" height=\"341\"\/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Infrared Proximity Sensor Projects<\/strong><\/h2>\n\n\n\n<p>Now that you&#8217;ve understood how to pair the Grove &#8211; 80cm Infrared Proximity Sensor, we&#8217;ll now take a look at some interesting projects you can consider!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Arduino101 BLE Autonomous Rover<\/strong><\/h3>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/hackster.imgix.net\/uploads\/attachments\/234837\/s4S6dQI4M2W6u6jiPLB2.uploads\/tmp\/1e256e21-d4ba-4f56-a3d6-59abe6d48cca\/tmp_image_0?auto=compress%2Cformat&amp;w=900&amp;h=675&amp;fit=min\" alt=\"\" width=\"393\" height=\"296\"\/><\/figure><\/div>\n\n\n\n<p>Kicking the list off is an Autonomous self-driving vehicle you can build by simply adding sensors to create a platform! <\/p>\n\n\n\n<p><strong>What do you need?<\/strong><\/p>\n\n\n\n<p><strong>Hardware components:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>1 Arduino 101 &amp; Genuino 101 <\/li><li>1 <a href=\"https:\/\/www.seeedstudio.com\/Grove-80cm-Infrared-Proximity-Sensor.html?utm_source=blog&amp;utm_medium=blog\">Seeed Grove &#8211; 80cm Infrared Proximity Sensor<\/a><\/li><li>1 Seeed Skeleton Bot &#8211; 4WD Mobile Robotic Platform<\/li><li>1 <a href=\"https:\/\/www.seeedstudio.com\/Grove-Starter-kit-for-Arduino-Genuino-101-p-2664.html?utm_source=blog&amp;utm_medium=blog\">Seeed Grove Starter kit for Arduino 101<\/a><\/li><li>2 <a href=\"https:\/\/www.seeedstudio.com\/Grove-I2C-Motor-Driver.html?utm_source=blog&amp;utm_medium=blog\">Seeed Grove &#8211; I2C Motor Driver Board<\/a><\/li><\/ul>\n\n\n\n<p><strong>Software apps and online services<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/www.arduino.cc\/en\/main\/software\">Arduino IDE<\/a><\/li><li><a href=\"https:\/\/www.nordicsemi.com\/Software-and-tools\/Development-Tools\/nRF-Toolbox\">Nordic Semiconductor BLE Toolbox<\/a><\/li><\/ul>\n\n\n\n<p><strong>Hand tools and fabrication machines<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Velcro Tape<\/li><li>Small screwdrivers<\/li><\/ul>\n\n\n\n<p><strong>Interested? You can find the <\/strong><a href=\"https:\/\/project.seeedstudio.com\/31926\/arduino101-ble-autonomous-rover-2cb19f\"><strong>full tutorial by Oliver Chen, shadeydave, Prashant Lalwani, Purval Sule<\/strong><\/a><strong> on Seeed Project Hub!<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Recreating Flappy Bird:&nbsp;Flappy&nbsp;Duino<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/statics3.seeedstudio.com\/images\/recipe\/img\/recipe\/2015-12\/5660331124431.jpg\" alt=\"\" width=\"395\" height=\"395\"\/><\/figure>\n\n\n\n<p>Miss playing flappy bird on a small handheld device? This project recreates the game with simple hardware and involves a twist; the player has to &#8220;flap&#8221; his\/her hand to fly the bird!<\/p>\n\n\n\n<p>Sounds interesting? Here&#8217;s what you need:<\/p>\n\n\n\n<p><strong>Hardware components<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Arduino Pro Mini 328<\/li><li><a href=\"https:\/\/www.seeedstudio.com\/Grove-80cm-Infrared-Proximity-Sensor.html?utm_source=blog&amp;utm_medium=blog\">Grove &#8211; 80cm Infrared Proximity Sensor<\/a><\/li><\/ul>\n\n\n\n<p><strong>Interested? You can find the<\/strong><a href=\"https:\/\/community.seeedstudio.com\/Flappy+Duino-p-1071.html\"><strong> tutorial by Baoshi Zhu<\/strong><\/a><strong> on Seeed Community website!<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Counting People<\/strong><\/h3>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/hackster.imgix.net\/uploads\/attachments\/532405\/55ac8f3497677.jpg?auto=compress%2Cformat&amp;w=900&amp;h=675&amp;fit=min\" alt=\"\" width=\"368\" height=\"276\"\/><\/figure><\/div>\n\n\n\n<p>Lastly, perhaps the most apparent project relating to proximity sensors being the detection of bi-directional in&amp;out of humans. To do so, this project mainly uses the IR proximity sensor alongside ultrasonic!<\/p>\n\n\n\n<p><strong>What do you need?<\/strong><\/p>\n\n\n\n<p><strong>Hardware components:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/www.seeedstudio.com\/Seeeduino-Cloud-Arduino-Yun-compatible-openWRT-controller-p-2123.html?utm_source=blog&amp;utm_medium=blog\">Seeeduino Cloud<\/a><\/li><li>8mm RGB Led Lamp common anode (10 PCs)<\/li><li><a href=\"https:\/\/www.seeedstudio.com\/Grove-4-Digit-Display.html?utm_source=blog&amp;utm_medium=blog\">Seeed 4 Digit Display<\/a><\/li><li><a href=\"https:\/\/www.seeedstudio.com\/Grove-Ultrasonic-Distance-Sensor.html?utm_source=blog&amp;utm_medium=blog\">Seeed Grove Ultrasonic Ranger<\/a><\/li><li><a href=\"https:\/\/www.seeedstudio.com\/Base-Shield-V2.html?utm_source=blog&amp;utm_medium=blog\">Seeed  Grove Base Shield<\/a><\/li><li><a href=\"https:\/\/www.seeedstudio.com\/Grove-80cm-Infrared-Proximity-Sensor.html?utm_source=blog&amp;utm_medium=blog\">Grove &#8211; 80cm Infrared Proximity Sensor<\/a><\/li><\/ul>\n\n\n\n<p><strong>Interested? You can find the <\/strong><a href=\"https:\/\/project.seeedstudio.com\/JackRose\/people-counting-969d77\"><strong>full tutorial by JackRose<\/strong><\/a><strong> on Seeed Project Hub!<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Resources and Going Further<\/strong><\/h2>\n\n\n\n<p><strong>For more on what I&#8217;ve covered today: <\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/raw.githubusercontent.com\/SeeedDocument\/Grove-80cm_Infrared_Proximity_Sensor\/master\/res\/GP2Y0A21YK.pdf\">GP2Y0A21YK Datasheet<\/a><\/li><li><span style=\"background-color: rgb(232, 234, 235);\"><b><a href=\"https:\/\/www.seeedstudio.com\/proximity-c-910.html?utm_source=blog&amp;utm_medium=blog\">List&nbsp;of&nbsp;our&nbsp;very&nbsp;own&nbsp;proximity&nbsp;sensors<\/a><\/b><\/span><\/li><\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Summary <\/strong><\/h2>\n\n\n\n<p>Overall, the <a href=\"https:\/\/www.seeedstudio.com\/Grove-80cm-Infrared-Proximity-Sensor.html?utm_source=blog&amp;utm_medium=blog\">Grove &#8211; 80cm Infrared Proximity Sensor<\/a>&nbsp;is one of many IR proximity sensors on the market. Boasting a good cost-to-performance ratio, and ease of pairing, it&#8217;s ideal for your next Arduino project that requires short-distance measurement! <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Proximity sensors are commonly used today alongside Arduino for many applications, ranging from distance measurement,<\/p>\n","protected":false},"author":2850,"featured_media":28033,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","_price":"","_stock":"","_tribe_ticket_header":"","_tribe_default_ticket_provider":"","_tribe_ticket_capacity":"0","_ticket_start_date":"","_ticket_end_date":"","_tribe_ticket_show_description":"","_tribe_ticket_show_not_going":false,"_tribe_ticket_use_global_stock":"","_tribe_ticket_global_stock_level":"","_global_stock_mode":"","_global_stock_cap":"","_tribe_rsvp_for_event":"","_tribe_ticket_going_count":"","_tribe_ticket_not_going_count":"","_tribe_tickets_list":"[]","_tribe_ticket_has_attendee_info_fields":false,"iawp_total_views":0,"footnotes":""},"categories":[1],"tags":[6,2335,139,2369,2371,2332,2370,1238,1131,10,118],"class_list":["post-28018","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news","tag-arduino","tag-distance-sensor","tag-grove","tag-infrared","tag-ir-distance-sensor","tag-proximity","tag-proximity-distance-sensor","tag-proximity-sensor","tag-proximity-sensors","tag-sensor","tag-wireless"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>IR Proximity Sensor for Arduino Distance Measuring - Latest News from Seeed Studio<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.seeedstudio.com\/blog\/2019\/12\/17\/ir-proximity-sensor-for-easy-arduino-distance-measuring\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"IR Proximity Sensor for Arduino Distance Measuring - Latest News from Seeed Studio\" \/>\n<meta property=\"og:description\" content=\"Proximity sensors are commonly used today alongside Arduino for many applications, ranging from distance measurement,\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.seeedstudio.com\/blog\/2019\/12\/17\/ir-proximity-sensor-for-easy-arduino-distance-measuring\/\" \/>\n<meta property=\"og:site_name\" content=\"Latest News from Seeed Studio\" \/>\n<meta property=\"article:published_time\" content=\"2019-12-17T10:15:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-06-22T07:57:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/12\/IR-proximity-sensor.png\" \/>\n\t<meta property=\"og:image:width\" content=\"619\" \/>\n\t<meta property=\"og:image:height\" content=\"376\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Shawn\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Shawn\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2019\/12\/17\/ir-proximity-sensor-for-easy-arduino-distance-measuring\/\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/2019\/12\/17\/ir-proximity-sensor-for-easy-arduino-distance-measuring\/\",\"name\":\"IR Proximity Sensor for Arduino Distance Measuring - Latest News from Seeed Studio\",\"isPartOf\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2019\/12\/17\/ir-proximity-sensor-for-easy-arduino-distance-measuring\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2019\/12\/17\/ir-proximity-sensor-for-easy-arduino-distance-measuring\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/12\/IR-proximity-sensor.png\",\"datePublished\":\"2019-12-17T10:15:30+00:00\",\"dateModified\":\"2020-06-22T07:57:12+00:00\",\"author\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/c9b61b761840d544e2d830b0e3bc9fe2\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2019\/12\/17\/ir-proximity-sensor-for-easy-arduino-distance-measuring\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.seeedstudio.com\/blog\/2019\/12\/17\/ir-proximity-sensor-for-easy-arduino-distance-measuring\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2019\/12\/17\/ir-proximity-sensor-for-easy-arduino-distance-measuring\/#primaryimage\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/12\/IR-proximity-sensor.png\",\"contentUrl\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/12\/IR-proximity-sensor.png\",\"width\":619,\"height\":376,\"caption\":\"Distance measuring made easy: IR Proximity sensor with Arduino\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2019\/12\/17\/ir-proximity-sensor-for-easy-arduino-distance-measuring\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.seeedstudio.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"IR Proximity Sensor for Arduino Distance Measuring\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#website\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/\",\"name\":\"Latest News from Seeed Studio\",\"description\":\"Emerging IoT, AI and Autonomous Applications on the Edge\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.seeedstudio.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/c9b61b761840d544e2d830b0e3bc9fe2\",\"name\":\"Shawn\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5afdc71205d9d485de69bc4b192294e3?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5afdc71205d9d485de69bc4b192294e3?s=96&r=g\",\"caption\":\"Shawn\"},\"url\":\"https:\/\/www.seeedstudio.com\/blog\/author\/shawn\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"IR Proximity Sensor for Arduino Distance Measuring - Latest News from Seeed Studio","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.seeedstudio.com\/blog\/2019\/12\/17\/ir-proximity-sensor-for-easy-arduino-distance-measuring\/","og_locale":"en_US","og_type":"article","og_title":"IR Proximity Sensor for Arduino Distance Measuring - Latest News from Seeed Studio","og_description":"Proximity sensors are commonly used today alongside Arduino for many applications, ranging from distance measurement,","og_url":"https:\/\/www.seeedstudio.com\/blog\/2019\/12\/17\/ir-proximity-sensor-for-easy-arduino-distance-measuring\/","og_site_name":"Latest News from Seeed Studio","article_published_time":"2019-12-17T10:15:30+00:00","article_modified_time":"2020-06-22T07:57:12+00:00","og_image":[{"width":619,"height":376,"url":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/12\/IR-proximity-sensor.png","type":"image\/png"}],"author":"Shawn","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Shawn","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.seeedstudio.com\/blog\/2019\/12\/17\/ir-proximity-sensor-for-easy-arduino-distance-measuring\/","url":"https:\/\/www.seeedstudio.com\/blog\/2019\/12\/17\/ir-proximity-sensor-for-easy-arduino-distance-measuring\/","name":"IR Proximity Sensor for Arduino Distance Measuring - Latest News from Seeed Studio","isPartOf":{"@id":"https:\/\/www.seeedstudio.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2019\/12\/17\/ir-proximity-sensor-for-easy-arduino-distance-measuring\/#primaryimage"},"image":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2019\/12\/17\/ir-proximity-sensor-for-easy-arduino-distance-measuring\/#primaryimage"},"thumbnailUrl":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/12\/IR-proximity-sensor.png","datePublished":"2019-12-17T10:15:30+00:00","dateModified":"2020-06-22T07:57:12+00:00","author":{"@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/c9b61b761840d544e2d830b0e3bc9fe2"},"breadcrumb":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2019\/12\/17\/ir-proximity-sensor-for-easy-arduino-distance-measuring\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.seeedstudio.com\/blog\/2019\/12\/17\/ir-proximity-sensor-for-easy-arduino-distance-measuring\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.seeedstudio.com\/blog\/2019\/12\/17\/ir-proximity-sensor-for-easy-arduino-distance-measuring\/#primaryimage","url":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/12\/IR-proximity-sensor.png","contentUrl":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/12\/IR-proximity-sensor.png","width":619,"height":376,"caption":"Distance measuring made easy: IR Proximity sensor with Arduino"},{"@type":"BreadcrumbList","@id":"https:\/\/www.seeedstudio.com\/blog\/2019\/12\/17\/ir-proximity-sensor-for-easy-arduino-distance-measuring\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.seeedstudio.com\/blog\/"},{"@type":"ListItem","position":2,"name":"IR Proximity Sensor for Arduino Distance Measuring"}]},{"@type":"WebSite","@id":"https:\/\/www.seeedstudio.com\/blog\/#website","url":"https:\/\/www.seeedstudio.com\/blog\/","name":"Latest News from Seeed Studio","description":"Emerging IoT, AI and Autonomous Applications on the Edge","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.seeedstudio.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/c9b61b761840d544e2d830b0e3bc9fe2","name":"Shawn","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5afdc71205d9d485de69bc4b192294e3?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5afdc71205d9d485de69bc4b192294e3?s=96&r=g","caption":"Shawn"},"url":"https:\/\/www.seeedstudio.com\/blog\/author\/shawn\/"}]}},"modified_by":"Shawn","views":31699,"featured_image_urls":{"full":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/12\/IR-proximity-sensor.png",619,376,false],"thumbnail":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/12\/IR-proximity-sensor-80x80.png",80,80,true],"medium":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/12\/IR-proximity-sensor-300x182.png",300,182,true],"medium_large":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/12\/IR-proximity-sensor.png",619,376,false],"large":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/12\/IR-proximity-sensor.png",619,376,false],"1536x1536":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/12\/IR-proximity-sensor.png",619,376,false],"2048x2048":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/12\/IR-proximity-sensor.png",619,376,false],"visody_icon":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/12\/IR-proximity-sensor.png",32,19,false],"magazine-7-slider-full":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/12\/IR-proximity-sensor.png",619,376,false],"magazine-7-slider-center":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/12\/IR-proximity-sensor.png",619,376,false],"magazine-7-featured":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/12\/IR-proximity-sensor.png",619,376,false],"magazine-7-medium":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/12\/IR-proximity-sensor.png",619,376,false],"magazine-7-medium-square":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/12\/IR-proximity-sensor.png",619,376,false]},"author_info":{"display_name":"Shawn","author_link":"https:\/\/www.seeedstudio.com\/blog\/author\/shawn\/"},"category_info":"<a href=\"https:\/\/www.seeedstudio.com\/blog\/category\/news\/\" rel=\"category tag\">News<\/a>","tag_info":"News","comment_count":"0","_links":{"self":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/28018","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/users\/2850"}],"replies":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/comments?post=28018"}],"version-history":[{"count":5,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/28018\/revisions"}],"predecessor-version":[{"id":34069,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/28018\/revisions\/34069"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/media\/28033"}],"wp:attachment":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/media?parent=28018"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/categories?post=28018"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/tags?post=28018"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}