{"id":35023,"date":"2020-09-25T09:30:40","date_gmt":"2020-09-25T01:30:40","guid":{"rendered":"\/blog\/?p=35023"},"modified":"2020-09-27T11:45:37","modified_gmt":"2020-09-27T03:45:37","slug":"how-does-arduino-work-with-ultrasonic-sensor","status":"publish","type":"post","link":"https:\/\/www.seeedstudio.com\/blog\/2020\/09\/25\/how-does-arduino-work-with-ultrasonic-sensor\/","title":{"rendered":"How does Arduino work with Ultrasonic Sensor?"},"content":{"rendered":"\n<p>How did hallway lights get turned on automatically? Why do automatic doors open when you get close? Why can the faucet of lavabo turn on and off automatically? I guess you&#8217;ll be confident enough to say, I know! Because they all have sensors! <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2020\/09\/ELECTRON\u00eeCA-1030x576.png\" alt=\"\" class=\"wp-image-36766\" width=\"521\" height=\"291\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/09\/ELECTRON\u00eeCA-1030x576.png 1030w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/09\/ELECTRON\u00eeCA-300x168.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/09\/ELECTRON\u00eeCA-768x430.png 768w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/09\/ELECTRON\u00eeCA-1536x859.png 1536w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/09\/ELECTRON\u00eeCA-1024x573.png 1024w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/09\/ELECTRON\u00eeCA.png 1924w\" sizes=\"(max-width: 521px) 100vw, 521px\" \/><\/figure><\/div>\n\n\n\n<p>Yes, it&#8217;s because of the sensor, but do you know how does a sensor work? How did it detect your presence?  In today&#8217;s article, we will break down the big concept of sensors into individual portions. For example, what does sensor use to detect distance, and how did the detected data get sent back?<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>This blog will cover :<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Principles for ultrasonic sensor to detect distance <\/li><li>Details on ultrasonic sensors and their function <\/li><li>How does ultrasonic sensor work with Arduino<\/li><li>Choice of ultrasonic sensor &#8211; Grove ultrasonic sensor or HC-SR04? <\/li><li>Arduino Projects and Applications with ultrasonic sensor<\/li><\/ul>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Arduino and <a href=\"https:\/\/www.seeedstudio.com\/Grove-Ultrasonic-Distance-Sensor.html\">Ultrasonic Sensor<\/a> &#8211; How do they work together?<\/h2>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Introduction to <a href=\"https:\/\/www.seeedstudio.com\/Grove-Ultrasonic-Distance-Sensor.html\">Ultrasonic Sensor<\/a><\/h3>\n\n\n\n<p>If you have a car, the astern radar helps you a lot in your daily life, isn&#8217;t it?  It is more accurate than the naked eye and much more convenient.<\/p>\n\n\n\n<p>The radar detects distance by the ultrasonic sensor,  but how exactly does ultrasonic work?<\/p>\n\n\n\n<p>The ultrasonic sensor&nbsp;emits ultrasound at 40000 Hz that travels through the air,  and bounce if there is an object or obstacle on its path. When the sensor receives the reflected wave, the distance can be thickened by the velocity of sound and time.  Using the formula,  Distance = velocity x time.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2020\/08\/\u5c4f\u5e55\u5feb\u7167-2020-08-13-\u4e0b\u53484.24.38.png\" alt=\"\" class=\"wp-image-35041\" width=\"387\" height=\"206\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/08\/\u5c4f\u5e55\u5feb\u7167-2020-08-13-\u4e0b\u53484.24.38.png 516w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/08\/\u5c4f\u5e55\u5feb\u7167-2020-08-13-\u4e0b\u53484.24.38-300x159.png 300w\" sizes=\"(max-width: 387px) 100vw, 387px\" \/><figcaption>Ref: Tutorialspoint <\/figcaption><\/figure><\/div>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/www.seeedstudio.com\/Grove-Ultrasonic-Distance-Sensor.html\">Grove Ultrasonic Sensor&#8217;<\/a>s parameters<\/h3>\n\n\n\n<p>The <a href=\"https:\/\/www.seeedstudio.com\/Grove-Ultrasonic-Distance-Sensor.html\">Grove &#8211; Ultrasonic Distance Sensor <\/a>can measure from 3&nbsp;cm to 350&nbsp;cm&nbsp;with the accuracy up to 2&nbsp;mm.&nbsp; It&nbsp;is the perfect ultrasonic&nbsp;module for distance measurement, proximity sensors, and&nbsp;ultrasonic detectors.&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/www.seeedstudio.com\/Grove-Ultrasonic-Distance-Sensor.html\"><img decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2020\/08\/\u5c4f\u5e55\u5feb\u7167-2020-08-13-\u4e0b\u53484.32.49.png\" alt=\"\" class=\"wp-image-35043\" width=\"402\" height=\"230\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/08\/\u5c4f\u5e55\u5feb\u7167-2020-08-13-\u4e0b\u53484.32.49.png 536w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/08\/\u5c4f\u5e55\u5feb\u7167-2020-08-13-\u4e0b\u53484.32.49-300x172.png 300w\" sizes=\"(max-width: 402px) 100vw, 402px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>Technical details: <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2020\/08\/\u5c4f\u5e55\u5feb\u7167-2020-08-13-\u4e0b\u53484.57.51-1.png\" alt=\"\" class=\"wp-image-35046\" width=\"408\" height=\"321\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/08\/\u5c4f\u5e55\u5feb\u7167-2020-08-13-\u4e0b\u53484.57.51-1.png 544w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/08\/\u5c4f\u5e55\u5feb\u7167-2020-08-13-\u4e0b\u53484.57.51-1-300x236.png 300w\" sizes=\"(max-width: 408px) 100vw, 408px\" \/><\/figure><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">How to connect Arduino with <a href=\"https:\/\/www.seeedstudio.com\/Grove-Ultrasonic-Distance-Sensor.html\">Grove Ultrasonic Sensor<\/a><\/h3>\n\n\n\n<ol class=\"wp-block-list\"><li><a href=\"https:\/\/www.seeedstudio.com\/Grove-Ultrasonic-Distance-Sensor.html\"> Connect Ultrasonic Ranger<\/a> to port D7 of<a href=\"https:\/\/www.seeedstudio.com\/Base-Shield-V2.html\"> Grove-Base Shield<\/a><\/li><li>Plug <a href=\"https:\/\/www.seeedstudio.com\/Base-Shield-V2.html\">Grove &#8211; Base Shield<\/a> into Seeeduino<\/li><li>Connect Seeeduino to PC via a <a href=\"https:\/\/www.seeedstudio.com\/Micro-USB-Cable-48cm-p-1475.html\">USB cable<\/a><\/li><\/ol>\n\n\n\n<p>All products lists above are offered at <a href=\"https:\/\/www.seeedstudio.com\/\">Seeed Studio.<\/a><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2020\/08\/\u5c4f\u5e55\u5feb\u7167-2020-08-13-\u4e0b\u53485.22.36.png\" alt=\"\" class=\"wp-image-35049\" width=\"395\" height=\"415\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/08\/\u5c4f\u5e55\u5feb\u7167-2020-08-13-\u4e0b\u53485.22.36.png 526w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/08\/\u5c4f\u5e55\u5feb\u7167-2020-08-13-\u4e0b\u53485.22.36-285x300.png 285w\" sizes=\"(max-width: 395px) 100vw, 395px\" \/><\/figure><\/div>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Why is <a href=\"https:\/\/www.seeedstudio.com\/Grove-Ultrasonic-Distance-Sensor.html\">Grove Ultrasonic Sensor<\/a> better than <strong>HC-SR04<\/strong>?<\/h2>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/github.com\/SeeedDocument\/Grove_Ultrasonic_Ranger\/raw\/master\/optimizing\/Compare.jpg\" alt=\"\" width=\"578\" height=\"233\"\/><\/figure><\/div>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>I\/O Pins<\/strong>:  our product&nbsp;integrates a<strong> single-chip microcomputer<\/strong>,&nbsp;and the transmitting signal and the receiving signal share one pin by time-division multiplexing, so<strong> only one I\/O pin is occupied<\/strong>.&nbsp;<\/li><li><strong>Voltage<\/strong>: HC-SR04 <strong>only supports 5v voltage<\/strong>, while&nbsp;Grove &#8211; Ultrasonic Distance Sensor <strong>supports 5v and 3.3v<\/strong>. <\/li><li><strong>Pairing<\/strong>: Grove &#8211; Ultrasonic Distance Sensor can be directly connected to the I\/O of the Raspberry Pi (3.3v) , while HC-SR04 requires a voltage conversion circuit. <\/li><li><strong>Bonus<\/strong>: Seeed provides <strong>full documents and libraries<\/strong> for Arduino, Python, and Codecraft, allows you to use our Grove &#8211; Ultrasonic Distance Sensor with Arduino and Raspberry pi easily. <\/li><\/ol>\n\n\n\n<p>Thus, there&#8217;s no reason not to choose our <a href=\"https:\/\/www.seeedstudio.com\/Grove-Ultrasonic-Distance-Sensor.html\">Grove &#8211; Ultrasonic Distance Sensor<\/a> if you want a more user-friendly and versatile ultrasonic sensor! <\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Arduino Projects and Applications with Ultrasonic Sensor <\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Play With Arduino<\/h3>\n\n\n\n<p>After you have obtained all the products mentioned above and connected them, you can then begin with the following projects:<\/p>\n\n\n\n<p>by <a href=\"https:\/\/www.seeedstudio.com\/\">Seeed Studio<\/a> <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Step 1.<\/strong>&nbsp;Download the&nbsp;<a href=\"https:\/\/github.com\/Seeed-Studio\/Seeed_Arduino_UltrasonicRanger\/archive\/master.zip\">UltrasonicRanger Library<\/a>&nbsp;from Github.<\/li><li><strong>Step 2.<\/strong>&nbsp;Refer&nbsp;<a href=\"https:\/\/wiki.seeedstudio.com\/How_to_install_Arduino_Library\">How to install library<\/a>&nbsp;to install library for Arduino.<\/li><li><strong>Step 3.<\/strong>&nbsp;Copy the code into Arduino IDE and upload. <\/li><\/ul>\n\n\n\n<p> If you need help with uploading the code, you can check&nbsp;<a href=\"https:\/\/wiki.seeedstudio.com\/Upload_Code\/\">how to upload code<\/a>. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2020\/08\/\u5c4f\u5e55\u5feb\u7167-2020-08-13-\u4e0b\u53485.58.14.png\" alt=\"\" class=\"wp-image-35051\" width=\"437\" height=\"417\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/08\/\u5c4f\u5e55\u5feb\u7167-2020-08-13-\u4e0b\u53485.58.14.png 583w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/08\/\u5c4f\u5e55\u5feb\u7167-2020-08-13-\u4e0b\u53485.58.14-300x286.png 300w\" sizes=\"(max-width: 437px) 100vw, 437px\" \/><\/figure><\/div>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Step 4.<\/strong>&nbsp;We&#8217;ll be able to see the distance display on the terminal as shown:<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2020\/08\/\u5c4f\u5e55\u5feb\u7167-2020-08-13-\u4e0b\u53486.00.58.png\" alt=\"\" class=\"wp-image-35052\" width=\"442\" height=\"182\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/08\/\u5c4f\u5e55\u5feb\u7167-2020-08-13-\u4e0b\u53486.00.58.png 589w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/08\/\u5c4f\u5e55\u5feb\u7167-2020-08-13-\u4e0b\u53486.00.58-300x123.png 300w\" sizes=\"(max-width: 442px) 100vw, 442px\" \/><\/figure><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Arduino &#8211; Ultrasonic Sensor<\/h3>\n\n\n\n<p>by <a href=\"https:\/\/www.tutorialspoint.com\/arduino\/arduino_ultrasonic_sensor.htm\">Tutorialspoint<\/a> <\/p>\n\n\n\n<p>Follow the circuit diagram and make the connections as shown in the image given below.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2020\/08\/\u5c4f\u5e55\u5feb\u7167-2020-08-13-\u4e0b\u53485.05.01.png\" alt=\"\" class=\"wp-image-35053\" width=\"563\" height=\"329\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/08\/\u5c4f\u5e55\u5feb\u7167-2020-08-13-\u4e0b\u53485.05.01.png 751w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/08\/\u5c4f\u5e55\u5feb\u7167-2020-08-13-\u4e0b\u53485.05.01-300x175.png 300w\" sizes=\"(max-width: 563px) 100vw, 563px\" \/><\/figure><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Open the Arduino IDE software on your computer. Add Coding in the Arduino language will allow you to control your circuit. Open a new sketch File by clicking New.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/www.tutorialspoint.com\/arduino\/images\/sketch.jpg\" alt=\"\"\/><\/figure><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>The Ultrasonic sensor has four terminals &#8211; +5V, Trigger, Echo, and GND connected as follows \u2212<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Connect the +5V pin to +5v on your Arduino board.<\/li><li>Connect Trigger to digital pin 7 on your Arduino board.<\/li><li>Connect Echo to digital pin 6 on your Arduino board.<\/li><li>Connect GND with GND on Arduino.<\/li><\/ul>\n\n\n\n<p>In the program,  the distance measured by the sensor in inches and cm via the serial port will be displayed.<\/p>\n\n\n\n<p>For Arduino Code in detail, visit the official website of <a href=\"https:\/\/www.tutorialspoint.com\/arduino\/arduino_ultrasonic_sensor.htm\">Tutorialspoint<\/a>. <\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Simple Arduino and HC-SR04 (Replaceble by <a href=\"https:\/\/www.seeedstudio.com\/Grove-Ultrasonic-Distance-Sensor.html\">Grove Ultrasonic Sensor<\/a>)<\/h3>\n\n\n\n<p>by <a href=\"https:\/\/www.instructables.com\/id\/Simple-Arduino-and-HC-SR04-Example\/\">instructables circuit <\/a><\/p>\n\n\n\n<figure class=\"wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"Simple Arduino and HC-SR04 Example\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/4NcAH2PneAE?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>Need a beginner-friendly set-up to start? This project requires minimal components and will definitely get you started on ultrasonic sensors!<\/p>\n\n\n\n<p>What you will need:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/www.seeedstudio.com\/Arduino-Uno-Rev3-p-2995.html\">Arduino UNO R3<\/a><\/li><li>HC-SR04 Ultrasonic Sensor<\/li><li>Green and Red LED<\/li><li>2 x 560 Ohm (Green, Blue, Brown, Gold) Resistors<\/li><li>Half Breadboard<\/li><li>8 x Male\/Male hookup wires<\/li><li>A ruler that measures centimeters (or a serial monitor)<\/li><\/ul>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p> Once you&#8217;ve gathered everything, time to connect all the components! <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2020\/08\/\u5c4f\u5e55\u5feb\u7167-2020-08-13-\u4e0b\u53486.16.48.png\" alt=\"\" class=\"wp-image-35054\" width=\"430\" height=\"282\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/08\/\u5c4f\u5e55\u5feb\u7167-2020-08-13-\u4e0b\u53486.16.48.png 859w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/08\/\u5c4f\u5e55\u5feb\u7167-2020-08-13-\u4e0b\u53486.16.48-300x197.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/08\/\u5c4f\u5e55\u5feb\u7167-2020-08-13-\u4e0b\u53486.16.48-768x504.png 768w\" sizes=\"(max-width: 430px) 100vw, 430px\" \/><\/figure><\/div>\n\n\n\n<p>Then upload the sketch, copy the sketch to your Arduino and watch the blinky lights!<\/p>\n\n\n\n<p>For more details on Arduino Code, visit the official website of <a href=\"https:\/\/www.instructables.com\/id\/Simple-Arduino-and-HC-SR04-Example\/\"> instructables circuit<\/a><\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Indoor Lightning Cloud<\/h3>\n\n\n\n<p>by <a href=\"https:\/\/community.seeedstudio.com\/Indoor+Lightning+Cloud+-p-182.html\">Seeed Community<\/a><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/statics3.seeedstudio.com\/images\/recipe\/img\/recipe\/2015-04\/551bb546cf6e9.gif\" alt=\"\" width=\"527\" height=\"352\"\/><\/figure><\/div>\n\n\n\n<p>Looking to spice up your living space with some cool lighting? Try this project out for a stormy interior feel!<\/p>\n\n\n\n<p>What you will need:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Seeeduino board<\/li><li>Grove &#8211; Base Shield<\/li><li>Wall Adapter Power Supply &#8211; 9V C 1A<\/li><li>Digital RGB LED Flexi-Strip 30 LED &#8211; 1 Meter<\/li><li>Grove &#8211; Ultrasonic Ranger <\/li><li>Grove &#8211; Universal 4 Pin Buckled Cables at 20 cm and 50 cm<\/li><\/ul>\n\n\n\n<p>Sounds interesting? Click <a href=\"https:\/\/community.seeedstudio.com\/Indoor+Lightning+Cloud+-p-182.html\">here<\/a> for more information and instructions!<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<p>That&#8217;s all on ultrasonic sensors! Did we answer your questions? We discussed what are ultrasonic sensors and how they work. We also shared about HC-SR04 and our Grove &#8211; Ultrasonic Distance Sensor, as well as some projects and tutorials on it.<\/p>\n\n\n\n<p>So what are you waiting for? Try out our  <a href=\"https:\/\/www.seeedstudio.com\/Grove-Ultrasonic-Distance-Sensor.html\">Grove &#8211; Ultrasonic Distance Sensor<\/a> today!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How did hallway lights get turned on automatically? Why do automatic doors open when you<\/p>\n","protected":false},"author":3526,"featured_media":36766,"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":[1884,142,1113,3205],"class_list":["post-35023","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news","tag-hc-sr04","tag-open-hardware","tag-ultrasonic-sensor","tag-ultrasonic-sensor-project"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How does Arduino work with Ultrasonic Sensor? - 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\/2020\/09\/25\/how-does-arduino-work-with-ultrasonic-sensor\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How does Arduino work with Ultrasonic Sensor? - Latest News from Seeed Studio\" \/>\n<meta property=\"og:description\" content=\"How did hallway lights get turned on automatically? Why do automatic doors open when you\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.seeedstudio.com\/blog\/2020\/09\/25\/how-does-arduino-work-with-ultrasonic-sensor\/\" \/>\n<meta property=\"og:site_name\" content=\"Latest News from Seeed Studio\" \/>\n<meta property=\"article:published_time\" content=\"2020-09-25T01:30:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-09-27T03:45:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/09\/ELECTRON\u00eeCA.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1924\" \/>\n\t<meta property=\"og:image:height\" content=\"1076\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Michelle Jin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Michelle Jin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/09\/25\/how-does-arduino-work-with-ultrasonic-sensor\/\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/09\/25\/how-does-arduino-work-with-ultrasonic-sensor\/\",\"name\":\"How does Arduino work with Ultrasonic Sensor? - Latest News from Seeed Studio\",\"isPartOf\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/09\/25\/how-does-arduino-work-with-ultrasonic-sensor\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/09\/25\/how-does-arduino-work-with-ultrasonic-sensor\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/09\/ELECTRON\u00eeCA.png\",\"datePublished\":\"2020-09-25T01:30:40+00:00\",\"dateModified\":\"2020-09-27T03:45:37+00:00\",\"author\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/a444d048443026bfda3e009239d73159\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/09\/25\/how-does-arduino-work-with-ultrasonic-sensor\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.seeedstudio.com\/blog\/2020\/09\/25\/how-does-arduino-work-with-ultrasonic-sensor\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/09\/25\/how-does-arduino-work-with-ultrasonic-sensor\/#primaryimage\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/09\/ELECTRON\u00eeCA.png\",\"contentUrl\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/09\/ELECTRON\u00eeCA.png\",\"width\":1924,\"height\":1076,\"caption\":\"How does Arduino work with Ultrasonic Sensor?\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2020\/09\/25\/how-does-arduino-work-with-ultrasonic-sensor\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.seeedstudio.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How does Arduino work with Ultrasonic Sensor?\"}]},{\"@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\/a444d048443026bfda3e009239d73159\",\"name\":\"Michelle Jin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/93d9e917511839cf05d1eac77509f918?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/93d9e917511839cf05d1eac77509f918?s=96&r=g\",\"caption\":\"Michelle Jin\"},\"url\":\"https:\/\/www.seeedstudio.com\/blog\/author\/michelle-jin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How does Arduino work with Ultrasonic Sensor? - 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\/2020\/09\/25\/how-does-arduino-work-with-ultrasonic-sensor\/","og_locale":"en_US","og_type":"article","og_title":"How does Arduino work with Ultrasonic Sensor? - Latest News from Seeed Studio","og_description":"How did hallway lights get turned on automatically? Why do automatic doors open when you","og_url":"https:\/\/www.seeedstudio.com\/blog\/2020\/09\/25\/how-does-arduino-work-with-ultrasonic-sensor\/","og_site_name":"Latest News from Seeed Studio","article_published_time":"2020-09-25T01:30:40+00:00","article_modified_time":"2020-09-27T03:45:37+00:00","og_image":[{"width":1924,"height":1076,"url":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/09\/ELECTRON\u00eeCA.png","type":"image\/png"}],"author":"Michelle Jin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Michelle Jin","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/09\/25\/how-does-arduino-work-with-ultrasonic-sensor\/","url":"https:\/\/www.seeedstudio.com\/blog\/2020\/09\/25\/how-does-arduino-work-with-ultrasonic-sensor\/","name":"How does Arduino work with Ultrasonic Sensor? - Latest News from Seeed Studio","isPartOf":{"@id":"https:\/\/www.seeedstudio.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/09\/25\/how-does-arduino-work-with-ultrasonic-sensor\/#primaryimage"},"image":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/09\/25\/how-does-arduino-work-with-ultrasonic-sensor\/#primaryimage"},"thumbnailUrl":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/09\/ELECTRON\u00eeCA.png","datePublished":"2020-09-25T01:30:40+00:00","dateModified":"2020-09-27T03:45:37+00:00","author":{"@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/a444d048443026bfda3e009239d73159"},"breadcrumb":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/09\/25\/how-does-arduino-work-with-ultrasonic-sensor\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.seeedstudio.com\/blog\/2020\/09\/25\/how-does-arduino-work-with-ultrasonic-sensor\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/09\/25\/how-does-arduino-work-with-ultrasonic-sensor\/#primaryimage","url":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/09\/ELECTRON\u00eeCA.png","contentUrl":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/09\/ELECTRON\u00eeCA.png","width":1924,"height":1076,"caption":"How does Arduino work with Ultrasonic Sensor?"},{"@type":"BreadcrumbList","@id":"https:\/\/www.seeedstudio.com\/blog\/2020\/09\/25\/how-does-arduino-work-with-ultrasonic-sensor\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.seeedstudio.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How does Arduino work with Ultrasonic Sensor?"}]},{"@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\/a444d048443026bfda3e009239d73159","name":"Michelle Jin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/93d9e917511839cf05d1eac77509f918?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/93d9e917511839cf05d1eac77509f918?s=96&r=g","caption":"Michelle Jin"},"url":"https:\/\/www.seeedstudio.com\/blog\/author\/michelle-jin\/"}]}},"modified_by":"Gigi","views":27352,"featured_image_urls":{"full":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/09\/ELECTRON\u00eeCA.png",1924,1076,false],"thumbnail":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/09\/ELECTRON\u00eeCA-80x80.png",80,80,true],"medium":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/09\/ELECTRON\u00eeCA-300x168.png",300,168,true],"medium_large":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/09\/ELECTRON\u00eeCA-768x430.png",640,358,true],"large":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/09\/ELECTRON\u00eeCA-1030x576.png",640,358,true],"1536x1536":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/09\/ELECTRON\u00eeCA-1536x859.png",1536,859,true],"2048x2048":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/09\/ELECTRON\u00eeCA.png",1924,1076,false],"visody_icon":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/09\/ELECTRON\u00eeCA.png",32,18,false],"magazine-7-slider-full":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/09\/ELECTRON\u00eeCA-1536x1020.png",1536,1020,true],"magazine-7-slider-center":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/09\/ELECTRON\u00eeCA-936x897.png",936,897,true],"magazine-7-featured":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/09\/ELECTRON\u00eeCA-1024x573.png",1024,573,true],"magazine-7-medium":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/09\/ELECTRON\u00eeCA-720x380.png",720,380,true],"magazine-7-medium-square":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2020\/09\/ELECTRON\u00eeCA-675x450.png",675,450,true]},"author_info":{"display_name":"Michelle Jin","author_link":"https:\/\/www.seeedstudio.com\/blog\/author\/michelle-jin\/"},"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\/35023","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\/3526"}],"replies":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/comments?post=35023"}],"version-history":[{"count":20,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/35023\/revisions"}],"predecessor-version":[{"id":36817,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/35023\/revisions\/36817"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/media\/36766"}],"wp:attachment":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/media?parent=35023"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/categories?post=35023"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/tags?post=35023"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}