{"id":23817,"date":"2019-08-22T18:41:46","date_gmt":"2019-08-22T10:41:46","guid":{"rendered":"\/blog\/?p=23817"},"modified":"2019-08-22T19:02:26","modified_gmt":"2019-08-22T11:02:26","slug":"arduino-ultrasonic-sensor-based-distance-measurement","status":"publish","type":"post","link":"https:\/\/www.seeedstudio.com\/blog\/2019\/08\/22\/arduino-ultrasonic-sensor-based-distance-measurement\/","title":{"rendered":"Arduino &amp; Ultrasonic Sensor Based Distance Measurement"},"content":{"rendered":"\n<p>Before we start, we need to review the physical principles firstly that we have learned in a middle school:<\/p>\n\n\n\n<p><strong> Sound velocity in the air at normal temperature and pressure: 340m\/s<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>1. Ultrasonic Radar principle<\/strong><\/h2>\n\n\n\n<p>Ultrasound is a sound wave with a frequency higher than 20,000 Hz, which is named because its lower frequency limit is approximately equal to the upper limit of human hearing. Because of its good directional, strong penetrating ability, easy to obtain more concentrated sound energy, and far-reaching characteristics in water, it is adopted by the sonar system. It propagates at 340 m\/s in the air at 15 \u00b0 C at 1 standard atmosphere. However, when the sound wave encounters an obstacle during the propagation process, the reflection will also occur, so when we measure the time difference between the sound wave and the echo, we can estimate the distance the sound travels. At the same time, because the ultrasonic frequency is high and the wavelength is short, the diffraction is low and the restraint is good, so the energy attenuation is less, the distance of propagation is longer, and it is more suitable for long-distance measurement than the low-frequency sound.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"376\" height=\"108\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2019\/08\/2996831-b750426b228d944f.gif\" alt=\"\" class=\"wp-image-23818\" \/><figcaption><br>Ultrasonic ranging principle<\/figcaption><\/figure><\/div>\n\n\n\n<p>The measurement steps are:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>N MHz ultrasonic pulses are emitted, and the timing starts when the ultrasonic pulse is emitted and is recorded as t0.<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Start listening to the echo of the mHz ultrasonic pulse, listen to n and then end the timing, recorded as t1.<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Calculate the time difference t = t1 &#8211; t0, which is the time it takes for the ultrasonic wave to go back and forth<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Calculate the distance the ultrasonic wave travels s = v * (t1 &#8211; t0) \/ 2 (v is the speed of sound)<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>2. Ultrasonic distance sensor<\/strong><\/h2>\n\n\n\n<p>The more common ultrasonic ranging modules on the market today are the HC-SR04 series and the US-100 series, which can even be used in automotive reversing radars. Basically, this looks like this, there must be one or two cylinders of ultrasonic transceivers.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><a href=\"https:\/\/www.seeedstudio.com\/Grove-Ultrasonic-Ranger-p-960.html\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2019\/08\/\u56fe\u72475.png\" alt=\"\" class=\"wp-image-23819\" width=\"415\" height=\"262\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72475.png 830w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72475-300x189.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72475-768x484.png 768w\" sizes=\"(max-width: 415px) 100vw, 415px\" \/><\/a><figcaption><strong><a href=\"https:\/\/www.seeedstudio.com\/Grove-Ultrasonic-Ranger-p-960.html\">Ultrasonic distance sensor<\/a><\/strong><\/figcaption><\/figure><\/div>\n\n\n\n<p><a href=\"https:\/\/www.seeedstudio.com\/Grove-Ultrasonic-Ranger-p-960.html\">This ultrasonic module <\/a>uses 40 kHz sound waves. The audible frequency of the human ear ranges from 20 to 20 kHz. The sound frequency of the module is more than twice the upper limit of the human ear. It completely affects the normal life of human beings.<\/p>\n\n\n\n<p>GPIO is one of the most common control methods for the ultrasound.<\/p>\n\n\n\n<p>The wiring method is as follows:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Trigger, trigger input, default low level, input a high-level pulse that often exceeds 10\u03bcs to trigger the module to emit a set of ultrasonic pulses<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Echo, echo output, default low level after the module sends the ultrasonic pulse, the echo will output a high level, until the echo of all ultrasonic pulses is monitored (or the monitoring timeout), the low level will be output again.<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"412\" height=\"256\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2019\/08\/11.gif\" alt=\"\" class=\"wp-image-23820\" \/><figcaption>Ultrasonic ranging timing<\/figcaption><\/figure><\/div>\n\n\n\n<p>The steps are as follows:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Pull down after pulling the Trigger end for more than 10\u03bcs to trigger the module to transmit 8 times 40kHz ultrasonic pulses.<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Start listening to the Echo end, start timing when Echo output is high, and end timing when Echo outputs low level.<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Calculate the duration of the time, which is the time it takes for the sound wave to come and go.<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Calculate the path traveled by sound waves.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>3. Arduino &amp; Ultrasonic Sensor Based Distance Measurement<\/strong><\/h2>\n\n\n\n<p>1.Prepare the below stuff:<\/p>\n\n\n\n<ul class=\"wp-block-gallery aligncenter columns-3 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\"><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"525\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2019\/08\/grove-ultrasonic-distance-sensor-preview_1-2.png\" alt=\"\" data-id=\"23828\" data-link=\"\/blog\/?attachment_id=23828\" class=\"wp-image-23828\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/grove-ultrasonic-distance-sensor-preview_1-2.png 700w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/grove-ultrasonic-distance-sensor-preview_1-2-300x225.png 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/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\/08\/httpsstatics3.seeedstudio.comseeedfile2017-11bazaar622826_img_4763a-2.jpg\" alt=\"\" data-id=\"23829\" data-link=\"\/blog\/?attachment_id=23829\" class=\"wp-image-23829\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/httpsstatics3.seeedstudio.comseeedfile2017-11bazaar622826_img_4763a-2.jpg 700w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/httpsstatics3.seeedstudio.comseeedfile2017-11bazaar622826_img_4763a-2-300x225.jpg 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/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\/08\/httpsstatics3.seeedstudio.comseeedimg2016-09ojyc6a5jtrgslqwc5j7gw9ti-2.jpg\" alt=\"\" data-id=\"23830\" data-link=\"\/blog\/?attachment_id=23830\" class=\"wp-image-23830\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/httpsstatics3.seeedstudio.comseeedimg2016-09ojyc6a5jtrgslqwc5j7gw9ti-2.jpg 700w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/httpsstatics3.seeedstudio.comseeedimg2016-09ojyc6a5jtrgslqwc5j7gw9ti-2-300x225.jpg 300w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/figure><\/li><\/ul>\n\n\n\n<p>2. Connect <a href=\"https:\/\/www.seeedstudio.com\/Grove-Ultrasonic-Ranger-p-960.html\">Ultrasonic Ranger <\/a>to port D7 of <a href=\"https:\/\/www.seeedstudio.com\/Base-Shield-V2.html\">Grove-Base Shield.<\/a><\/p>\n\n\n\n<p>3. Plug Grove &#8211; Base Shield into <a href=\"https:\/\/www.seeedstudio.com\/Arduino-Uno-Rev3-p-2995.html\">ARDUINO<\/a>.<\/p>\n\n\n\n<p>4. Connect Aduino to PC via a USB cable.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2019\/08\/\u56fe\u72476.png\" alt=\"\" class=\"wp-image-23831\" width=\"276\" height=\"223\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72476.png 552w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72476-300x242.png 300w\" sizes=\"(max-width: 276px) 100vw, 276px\" \/><\/figure><\/div>\n\n\n\n<p>5. Software<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Open Arduino IDE<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Select Sketch &gt; Include Library &gt; Manage Libraries<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2019\/08\/\u56fe\u72477.png\" alt=\"\" class=\"wp-image-23952\" width=\"450\" height=\"124\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72477.png 899w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72477-300x83.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72477-768x212.png 768w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/figure><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>Type \u201cGrove Ultrasonic Ranger\u201d in the search box and click \u201cinstall\u201d<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2019\/08\/\u56fe\u72478.png\" alt=\"\" class=\"wp-image-23954\" width=\"490\" height=\"112\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72478.png 979w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72478-300x68.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72478-768x175.png 768w\" sizes=\"(max-width: 490px) 100vw, 490px\" \/><\/figure><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>Copy the following code into the Arduino IDE<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>#include \"Ultrasonic.h\"\n\nUltrasonic ultrasonic(7);\nvoid setup()\n{\n    Serial.begin(9600);\n}\nvoid loop()\n{\n    long RangeInInches;\n    long RangeInCentimeters;\n\n    Serial.println(\"The distance to obstacles in front is: \");\n    RangeInInches = ultrasonic.MeasureInInches();\n    Serial.print(RangeInInches);\/\/0~157 inches\n    Serial.println(\" inch\");\n    delay(250);\n\n    RangeInCentimeters = ultrasonic.MeasureInCentimeters(); \/\/ two measurements should keep an interval\n    Serial.print(RangeInCentimeters);\/\/0~400cm\n    Serial.println(\" cm\");\n    delay(250);\n}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>Select the board as Arduino UNO (Tools &gt; Board &gt; Arduino\/Genuino UNO)<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2019\/08\/\u56fe\u72479.png\" alt=\"\" class=\"wp-image-23957\" width=\"418\" height=\"178\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72479.png 836w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72479-300x127.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72479-768x326.png 768w\" sizes=\"(max-width: 418px) 100vw, 418px\" \/><\/figure><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li>Select the correct port<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2019\/08\/\u56fe\u724710.png\" alt=\"\" class=\"wp-image-23958\" width=\"330\" height=\"176\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u724710.png 659w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u724710-300x160.png 300w\" sizes=\"(max-width: 330px) 100vw, 330px\" \/><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Before we start, we need to review the physical principles firstly that we have learned<\/p>\n","protected":false},"author":150,"featured_media":23966,"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,1113],"class_list":["post-23817","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news","tag-arduino","tag-ultrasonic-sensor"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Arduino &amp; Ultrasonic Sensor Based Distance Measurement - 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\/08\/22\/arduino-ultrasonic-sensor-based-distance-measurement\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Arduino &amp; Ultrasonic Sensor Based Distance Measurement - Latest News from Seeed Studio\" \/>\n<meta property=\"og:description\" content=\"Before we start, we need to review the physical principles firstly that we have learned\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.seeedstudio.com\/blog\/2019\/08\/22\/arduino-ultrasonic-sensor-based-distance-measurement\/\" \/>\n<meta property=\"og:site_name\" content=\"Latest News from Seeed Studio\" \/>\n<meta property=\"article:published_time\" content=\"2019-08-22T10:41:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-08-22T11:02:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72476-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"552\" \/>\n\t<meta property=\"og:image:height\" content=\"446\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Dana\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dana\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 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\/08\/22\/arduino-ultrasonic-sensor-based-distance-measurement\/\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/2019\/08\/22\/arduino-ultrasonic-sensor-based-distance-measurement\/\",\"name\":\"Arduino &amp; Ultrasonic Sensor Based Distance Measurement - Latest News from Seeed Studio\",\"isPartOf\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2019\/08\/22\/arduino-ultrasonic-sensor-based-distance-measurement\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2019\/08\/22\/arduino-ultrasonic-sensor-based-distance-measurement\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72476-1.png\",\"datePublished\":\"2019-08-22T10:41:46+00:00\",\"dateModified\":\"2019-08-22T11:02:26+00:00\",\"author\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/e41d9353184fc0b7650686004ed5eb50\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2019\/08\/22\/arduino-ultrasonic-sensor-based-distance-measurement\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.seeedstudio.com\/blog\/2019\/08\/22\/arduino-ultrasonic-sensor-based-distance-measurement\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2019\/08\/22\/arduino-ultrasonic-sensor-based-distance-measurement\/#primaryimage\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72476-1.png\",\"contentUrl\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72476-1.png\",\"width\":552,\"height\":446},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2019\/08\/22\/arduino-ultrasonic-sensor-based-distance-measurement\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.seeedstudio.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Arduino &amp; Ultrasonic Sensor Based Distance Measurement\"}]},{\"@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\/e41d9353184fc0b7650686004ed5eb50\",\"name\":\"Dana\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ec5316369f1dd9f2b092db2c29821758?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ec5316369f1dd9f2b092db2c29821758?s=96&r=g\",\"caption\":\"Dana\"},\"url\":\"https:\/\/www.seeedstudio.com\/blog\/author\/dana\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Arduino &amp; Ultrasonic Sensor Based Distance Measurement - 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\/08\/22\/arduino-ultrasonic-sensor-based-distance-measurement\/","og_locale":"en_US","og_type":"article","og_title":"Arduino &amp; Ultrasonic Sensor Based Distance Measurement - Latest News from Seeed Studio","og_description":"Before we start, we need to review the physical principles firstly that we have learned","og_url":"https:\/\/www.seeedstudio.com\/blog\/2019\/08\/22\/arduino-ultrasonic-sensor-based-distance-measurement\/","og_site_name":"Latest News from Seeed Studio","article_published_time":"2019-08-22T10:41:46+00:00","article_modified_time":"2019-08-22T11:02:26+00:00","og_image":[{"width":552,"height":446,"url":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72476-1.png","type":"image\/png"}],"author":"Dana","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Dana","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.seeedstudio.com\/blog\/2019\/08\/22\/arduino-ultrasonic-sensor-based-distance-measurement\/","url":"https:\/\/www.seeedstudio.com\/blog\/2019\/08\/22\/arduino-ultrasonic-sensor-based-distance-measurement\/","name":"Arduino &amp; Ultrasonic Sensor Based Distance Measurement - Latest News from Seeed Studio","isPartOf":{"@id":"https:\/\/www.seeedstudio.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2019\/08\/22\/arduino-ultrasonic-sensor-based-distance-measurement\/#primaryimage"},"image":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2019\/08\/22\/arduino-ultrasonic-sensor-based-distance-measurement\/#primaryimage"},"thumbnailUrl":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72476-1.png","datePublished":"2019-08-22T10:41:46+00:00","dateModified":"2019-08-22T11:02:26+00:00","author":{"@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/e41d9353184fc0b7650686004ed5eb50"},"breadcrumb":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2019\/08\/22\/arduino-ultrasonic-sensor-based-distance-measurement\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.seeedstudio.com\/blog\/2019\/08\/22\/arduino-ultrasonic-sensor-based-distance-measurement\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.seeedstudio.com\/blog\/2019\/08\/22\/arduino-ultrasonic-sensor-based-distance-measurement\/#primaryimage","url":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72476-1.png","contentUrl":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72476-1.png","width":552,"height":446},{"@type":"BreadcrumbList","@id":"https:\/\/www.seeedstudio.com\/blog\/2019\/08\/22\/arduino-ultrasonic-sensor-based-distance-measurement\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.seeedstudio.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Arduino &amp; Ultrasonic Sensor Based Distance Measurement"}]},{"@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\/e41d9353184fc0b7650686004ed5eb50","name":"Dana","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ec5316369f1dd9f2b092db2c29821758?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ec5316369f1dd9f2b092db2c29821758?s=96&r=g","caption":"Dana"},"url":"https:\/\/www.seeedstudio.com\/blog\/author\/dana\/"}]}},"modified_by":"Dana","views":12500,"featured_image_urls":{"full":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72476-1.png",552,446,false],"thumbnail":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72476-1-80x80.png",80,80,true],"medium":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72476-1-300x242.png",300,242,true],"medium_large":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72476-1.png",552,446,false],"large":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72476-1.png",552,446,false],"1536x1536":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72476-1.png",552,446,false],"2048x2048":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72476-1.png",552,446,false],"visody_icon":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72476-1.png",32,26,false],"magazine-7-slider-full":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72476-1.png",552,446,false],"magazine-7-slider-center":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72476-1.png",552,446,false],"magazine-7-featured":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72476-1.png",552,446,false],"magazine-7-medium":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72476-1.png",470,380,false],"magazine-7-medium-square":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2019\/08\/\u56fe\u72476-1.png",552,446,false]},"author_info":{"display_name":"Dana","author_link":"https:\/\/www.seeedstudio.com\/blog\/author\/dana\/"},"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\/23817","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\/150"}],"replies":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/comments?post=23817"}],"version-history":[{"count":10,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/23817\/revisions"}],"predecessor-version":[{"id":23973,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/23817\/revisions\/23973"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/media\/23966"}],"wp:attachment":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/media?parent=23817"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/categories?post=23817"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/tags?post=23817"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}