{"id":40731,"date":"2021-02-08T18:03:08","date_gmt":"2021-02-08T10:03:08","guid":{"rendered":"\/blog\/?p=40731"},"modified":"2021-02-18T13:38:06","modified_gmt":"2021-02-18T05:38:06","slug":"wio-terminal-arduino-smart-doorbell-with-code","status":"publish","type":"post","link":"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/08\/wio-terminal-arduino-smart-doorbell-with-code\/","title":{"rendered":"Wio Terminal: Arduino Smart Doorbell (with Code!)"},"content":{"rendered":"\n<p>In this step by step tutorial, learn how to create your very own Arduino Smart Doorbell with your Wio Terminal! This project builds a doorbell that automatically detects the presence of movement, then notifies you on your mobile phone wherever you are. You can also follow along with any Arduino-compatible development board.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1030\" height=\"601\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-4-1030x601.png\" alt=\"\" class=\"wp-image-40754\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-4-1030x601.png 1030w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-4-300x175.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-4-768x448.png 768w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-4-1024x597.png 1024w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-4.png 1500w\" sizes=\"(max-width: 1030px) 100vw, 1030px\" \/><\/figure><\/div>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Introduction to the Smart Doorbell Project<\/strong><\/h2>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>There are many reasons why you might want a smart doorbell over the conventional one. For example, you might have a baby in your home and you don\u2019t want your dog to bark and wake her up every time a visitor comes by. Or, you might simply want to know when there are visitors when you aren\u2019t home!<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Whatever the case, we want our Arduino smart doorbell to be able to do two key things:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Automatically detect human presence<\/li><li>Discreetly notify the user of that presence<\/li><\/ol>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>To achieve this, we will make use of passive infrared sensors to detect motion. For the IoT side of things, there are many platforms that we can use, such as Microsoft Azure IoT and Google Cloud Platform. After some experimentation, however, I\u2019ve decided to use Blynk for this project since it is easy to set up and also provides a readily customisable mobile application interface!<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Passive Infrared (PIR) Motion Sensors<\/strong><\/h2>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Since PIR sensors are at the core of this project, it\u2019s worth taking some time to understand how they work.<\/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\/2021\/02\/PIR-Sensor.jpg\" alt=\"\" class=\"wp-image-40737\" width=\"500\" height=\"287\" \/><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Infrared Light<\/strong><\/h3>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>First of all, <a href=\"https:\/\/en.wikipedia.org\/wiki\/Infrared\">infrared light<\/a> is simply a type of light that is invisible to the human eye. IR is all around us, emitted by all living things that give off heat. They are also used in many electronic applications, such as sending communication signals and thermal imaging.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/RbROrHZ-9uP_MzxKq7g92j_pQvqqcaBsnpcF3tZfKkJ9bYbxS26aPX7DEHPV4MyfG51rfuwR-a_3qB4vT6_1nQAU4OBuVrOVdFAMn3dMspA_mywqN5Q2EoyGacaGjlq-q8zTgfrz\" alt=\"\" width=\"700\" height=\"320\" \/><figcaption>Source: Circuit Basics<\/figcaption><\/figure><\/div>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">PIR <strong>Sensor: Principle of Operation<\/strong><\/h3>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>A PIR sensor consists of two slots that each contain IR sensitive material.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/GU9biLa0mAUsKSYH9ZHd3q0_n20vBr8iFxYFgXsbo6JVw82f_JNO0lq4HZRiNTt1z0FxabVf3pw4HIypDSVVV9udrh3BcIIvK5e94WFzOFiVmJv4N194bvakpaUVTwpbe0PJprjO\" alt=\"\" \/><figcaption>Source: Last Minute Engineers<\/figcaption><\/figure><\/div>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>When an infrared-emitting body such as a human passes by, it will first intercept one of the IR slots, which causes a positive differential relative to the other IR slot. When the human then leaves the detecting area, the opposite occurs and a negative differential is created. The resulting signal is then detected collectively to produce a \u201cHIGH\u201d output.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/pProwbWtsBG9iw3ya2zoWhKKGeqdz0jgmOzspGb4lcLHNoI6io51-QusPnDlqZ97CkTm0ezSX3pJEuGShJRqECIdo8ZkeKGmBLablKOHJyijG85lCPqFO9lDDm2HPi5uuhzV0u-m\" alt=\"\" \/><figcaption>Source: Last Minute Engineers<\/figcaption><\/figure><\/div>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>It\u2019s important to understand that it is <strong><em>change<\/em><\/strong> that generates a positive output in our PIR sensor. If an infrared-emitting object remained still in the detecting area, our PIR sensor would eventually output \u201cLOW\u201d!<\/p>\n\n\n\n<p>Typically, PIR sensors are covered by a lens known as a Fresnel lens. This lens focuses IR waves from the surroundings onto the sensor. Now, instead of a detecting area of two blocks, we can cover a much wider area instead!<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Bringing the Wio Terminal Online with Blynk<\/strong><\/h2>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>When our Wio Terminal detects motion via the PIR Sensor, we want to receive a notification for it remotely. To do this, we\u2019ll use Blynk.<\/p>\n\n\n\n<p>Blynk is an IoT platform that allows us to quickly build IoT applications regardless of what hardware we are using. It can also be used for device management, data analytics and machine learning, but today we\u2019ll simply use it to receive messages from our Wio Terminal, and to remotely toggle some settings.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"478\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2021\/02\/architecture.png\" alt=\"\" class=\"wp-image-40732\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/architecture.png 640w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/architecture-300x224.png 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><figcaption>Source: Blynk<\/figcaption><\/figure><\/div>\n\n\n\n<p>Although Blynk will cost enterprises who want to use it to implement IoT on a large scale, their Developer Plan is free for individual use to build personal projects which is sufficient for today\u2019s purpose.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Platform Introduction: Wio Terminal<\/strong><\/h2>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Today\u2019s tutorial will be done with a Wio Terminal and the <a href=\"https:\/\/www.seeedstudio.com\/Grove-mini-PIR-motion-sensor-p-2930.html\">Grove Mini PIR Motion Sensor<\/a>!<\/p>\n\n\n\n<p>The Wio Terminal is a fully integrated microcontroller development platform that supports Arduino and MicroPython. It carries Bluetooth, Wi-Fi connectivity, and comes with an LCD screen, onboard IMU, microphone, buzzer, light sensor and infrared emitter. The Wio Terminal also features two multifunctional Grove ports which can be used to interface easily with plug-and-play Grove modules.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/AwANR3oJCxNuM-I5nlbT6_PY9o4lptQe3kze69peE5XL29p2FZd2vtaim0jCZqXRXOn69q4xSATb6ur3ulfwVfwviheI2SM3yY_2HfMGSfPlsLq_hGWmr9wYRTpaUx0xKG2QMQ5g\" alt=\"\" width=\"800\" height=\"462\" \/><\/figure><\/div>\n\n\n\n<p>The Wio Terminal is a great one-stop solution for today\u2019s project. Since we can simply make use of the inbuilt WiFi and plug our PIR sensor in via Grove, we\u2019ve eliminated the need for soldering or dealing with messy wires. We can even combine it with its dedicated <a href=\"https:\/\/laptrinhx.com\/link\/?l=https%3A%2F%2Fwww.seeedstudio.com%2FWio-Terminal-Chassis-Battery-650mAh-p-4756.html\">battery chassis<\/a> to make our doorbell a mobile and conveniently wall-mountable solution!<\/p>\n\n\n\n<p>Naturally, you can follow along with this tutorial with any other Arduino board and PIR Sensor, but you\u2019ll have to work a little harder to get the wiring done!<\/p>\n\n\n\n<p>You can pick up a Wio Terminal from the <a href=\"https:\/\/www.seeedstudio.com\/Wio-Terminal-p-4509.html\">Seeed Online Store<\/a>.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Note: While I\u2019ve chosen the Grove Mini PIR Motion Sensor for its compact size and low cost, feel free to choose from the following Grove PIR Motion Sensor modules. Some of them will offer additional functionality such as distance measurement and adjustable holding times.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/www.seeedstudio.com\/Grove-PIR-Motion-Sensor.html\">PIR Motion Sensor<\/a><\/li><li><a href=\"https:\/\/www.seeedstudio.com\/Grove-Adjustable-PIR-Motion-Sensor-p-3225.html\">Adjustable PIR Motion Sensor<\/a><\/li><li><a href=\"https:\/\/www.seeedstudio.com\/Grove-mini-PIR-motion-sensor-p-2930.html\">Mini PIR Motion Sensor<\/a><\/li><li><a href=\"https:\/\/www.seeedstudio.com\/Grove-Digital-PIR-Motion-Sensor-p-4524.html\">Digital PIR Motion Sensor<\/a><\/li><\/ul>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator\" \/>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Now, let\u2019s get into the tutorial proper!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Install Libraries<\/strong><\/h2>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>First of all, if this is your first time working with your Wio Terminal, I highly recommend you visit <a href=\"https:\/\/wiki.seeedstudio.com\/Wio-Terminal-Getting-Started\/\">this page<\/a> to install the required basic libraries and get started.<\/p>\n\n\n\n<p>Next, follow the instructions at <a href=\"https:\/\/wiki.seeedstudio.com\/Wio-Terminal-Network-Overview\/\">this link<\/a> to set up the WiFi capabilities on your Wio Terminal. This will involve updating the firmware of your Wio Terminal and installing several Arduino libraries.<\/p>\n\n\n\n<p>Finally, we will have to install the Blynk Library. Download the library from <a href=\"https:\/\/wiki.seeedstudio.com\/Wio-Terminal-Network-Overview\/\">this GitHub repository<\/a> as a ZIP and install it as you have the previous libraries.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Hardware Setup<\/strong><\/h2>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Plug your Grove PIR Sensor module into the Wio Terminal as shown below. That\u2019s it!<\/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\/2021\/02\/Copy-of-Clean-1030x495.png\" alt=\"\" class=\"wp-image-40740\" width=\"800\" height=\"384\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-1030x495.png 1030w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-300x144.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-768x369.png 768w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-1536x738.png 1536w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-2048x984.png 2048w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-1024x492.png 1024w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Set Up Blynk<\/strong><\/h2>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>To start, follow the instructions on the <a href=\"https:\/\/wiki.seeedstudio.com\/Wio-Terminal-Blynk\/\">Seeed Wiki<\/a> to set up a connected dashboard for interfacing with your Wio Terminal. I\u2019ve set up my dashboard as shown below with a value display, a styled button, and a notification.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1030\" height=\"538\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2021\/02\/Blynk-Setup-1030x538.png\" alt=\"\" class=\"wp-image-40742\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Blynk-Setup-1030x538.png 1030w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Blynk-Setup-300x157.png 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Blynk-Setup-768x401.png 768w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Blynk-Setup-1536x803.png 1536w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Blynk-Setup-2048x1070.png 2048w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Blynk-Setup-1024x535.png 1024w\" sizes=\"(max-width: 1030px) 100vw, 1030px\" \/><\/figure><\/div>\n\n\n\n<p>If you want to receive email alerts instead of notifications, you can do that as well. Read the <a href=\"https:\/\/docs.blynk.cc\/#widgets-notifications-email\">documentation<\/a> to learn how to do so.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Smart Doorbell Arduino Code<\/strong><\/h2>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Now, we have to program our Wio Terminal to receive data from our PIR sensor, as well as upload the collected data to the Blynk servers.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>First, take a look at the code below. You will also need to copy the Free_Fonts.h file from:<\/p>\n\n\n\n<p><code>~\/Arduino\/libraries\/Seeed_LCD_master\/examples\/320 x 240\/All_Free_Fonts_Demo<\/code><\/p>\n\n\n\n<p>and attach this header file to your sketch location in order to compile the sketch.<\/p>\n\n\n\n<p>Alternatively, download it together with the code from <a href=\"https:\/\/github.com\/supperted825\/WioTerminal_SmartDoorBell\">this link<\/a>.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Wio Terminal: Arduino Smart Doorbell\n\/\/ Author: Jonathan Tan\n\/\/ Feb 2021\n\/\/ Written for Seeed Wio Terminal\n\n#define BLYNK_PRINT Serial\n\n#include &lt;TFT_eSPI.h&gt;\n#include &lt;rpcWiFi.h&gt;\n#include &lt;WiFiClient.h&gt;\n#include &lt;BlynkSimpleWioTerminal.h&gt;\n#include \"Free_Fonts.h\"\n\n\/\/ Define PINs\n#define PIR PIN_WIRE_SCL\n#define LCD_BACKLIGHT (72Ul)\n\n\/\/ Define Timeouts\n#define LCDTimeout 20000\n#define notifyTimeout 20000\n\nTFT_eSPI tft;\nBlynkTimer timer;\n \n\/\/ You should get Auth Token in the Blynk App.\n\/\/ Go to the Project Settings (nut icon).\nchar auth&#091;] = \"YOURAUTHKEY\";\n \n\/\/ Your WiFi credentials.\n\/\/ Set password to \"\" for open networks.\nchar ssid&#091;] = \"YOURWIFISSID\";\nchar pass&#091;] = \"YOURWIFIPASSWORD\";\n\n\/\/ Standard Outputs\nString person = \"Movement Detected.\";\nString absent = \"All clear.\";\n\n\/\/ Variables\nint person_state;\nint notify_me;\nlong LCDmillis;\nlong notifyMillis;\nlong millisMarkerDebug;\n\nBLYNK_WRITE(V1) {\n   int pinValue = param.asInt();\n\n   \/\/ Debug: Check Toggle Inputs\n   Serial.print(\"Input Value: \");\n   Serial.println(pinValue);\n\n   \/\/ Toggle According to Pin Value\n   if (pinValue == 1) {\n       notify_me = 1;\n   } else {\n       notify_me = 0;\n   }\n}\n\nvoid sendPIRDetect() {\n    if(digitalRead(PIR)) {\n        person_state = 1;\n        Blynk.virtualWrite(V0, person);\n    if (notify_me == 1 &amp;&amp; millis() - notifyMillis &gt; notifyTimeout) {\n        Blynk.notify(\"Movement detected.\");\n        notifyMillis = millis();\n        }\n    } else {\n        person_state = 0;\n        Blynk.virtualWrite(V0, absent);\n    }\n}\n\nvoid eraseLCD() {\n    tft.fillRect(0, 0, TFT_HEIGHT, TFT_WIDTH, TFT_BLACK);\n}\n\nvoid setup() {\n    \/\/ Debug console\n    Serial.begin(9600);\n    \/\/ Actual Setup\n    pinMode(PIR, INPUT);\n    tft.begin();\n    tft.setRotation(3);\n    tft.fillScreen(TFT_BLACK);\n    tft.println(\"Initialising...\");\n    Blynk.begin(auth, ssid, pass);\n    timer.setInterval(5000L, sendPIRDetect);\n    tft.println(\"Connected!\");\n    delay(2000);\n    tft.fillScreen(TFT_BLACK);\n}\n \nvoid loop() {\n    Blynk.run();\n    timer.run();\n\n    \/\/ Turn LCD off after\n    if ( person_state == 0 &amp;&amp; (millis() - LCDmillis) &gt; LCDTimeout) {\n        eraseLCD();\n        digitalWrite(LCD_BACKLIGHT, LOW);\n    }\n\n    if (person_state == 1 &amp;&amp; (millis() - LCDmillis) &gt; LCDTimeout) {\n        digitalWrite(LCD_BACKLIGHT, HIGH);\n        LCDmillis = millis();\n        tft.setTextDatum(MC_DATUM);\n        tft.setFreeFont(FSSB18);\n        tft.drawString(\"Hello!\", 160, 100);\n        tft.setFreeFont(FSS9);\n        tft.drawString(\"A doorbell notification\", 160, 135);\n        tft.drawString(\"will be sent.\", 160, 155);\n    }\n    \n    \/\/ For Debugging in Serial Terminal\n    \n    if ( (millis() - millisMarkerDebug) &gt; 1000) {\n        millisMarkerDebug = millis();\n        if (digitalRead(PIR)) {\n            Serial.println(\"Movement Detected.\");\n        } else {\n            Serial.println(\"All Clear.\");\n        }\n    }\n    \n}<\/code><\/pre>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Adjusting the Parameters<\/strong><\/h3>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>If you want to use the code directly, you must adjust the following fields to include your own project authentication key and WiFi settings.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ You should get Auth Token in the Blynk App.\n\/\/ Go to the Project Settings (nut icon).\nchar auth&#091;] = \"YOURAUTHKEY\";\n \n\/\/ Your WiFi credentials.\n\/\/ Set password to \"\" for open networks.\nchar ssid&#091;] = \"YOURWIFISSID\";\nchar pass&#091;] = \"YOURWIFIPASSWORD\";<\/code><\/pre>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>You can also alter the following parameters. LCDTimeout dictates the number of milliseconds before the LCD screen is turned off to save power, while notifyTimeout dictates the duration in milliseconds to wait before the notification is sent to your mobile phone.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ Define Timeouts\n#define LCDTimeout 20000\n#define notifyTimeout 20000<\/code><\/pre>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Brief on Programming with Blynk<\/strong><\/h3>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>In the setup function, we first initialise our PIR sensor input pin, the LCD display, as well as our connection to the Blynk server.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>void setup() {\n    \/\/ Debug console\n    Serial.begin(9600);\n    \/\/ Actual Setup\n    pinMode(PIR, INPUT);\n    tft.begin();\n    tft.setRotation(3);\n    tft.fillScreen(TFT_BLACK);\n    tft.println(\"Initialising...\");\n    Blynk.begin(auth, ssid, pass);\n    timer.setInterval(5000L, sendPIRDetect);\n    tft.println(\"Connected!\");\n    delay(2000);\n    tft.fillScreen(TFT_BLACK);\n}<\/code><\/pre>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>You\u2019ll notice that the timer.setInterval() function call is used to call our sendPIRDetect() function every 5 seconds.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>timer.setInterval(5000L, sendPIRDetect);<\/code><\/pre>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>The timer is Blynk\u2019s proprietary syntax and is used instead of delay() to periodically perform tasks. This is because delay() function calls will pause the program entirely and cause our Wio Terminal to lose its connection with the Blynk servers.<\/p>\n\n\n\n<p>Be careful when playing with the timer intervals. You might be tempted to set the intervals short for debugging, but this will actually cause your device to be disconnected from the Blynk servers automatically due to spam detection!<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Sending Sensor Data<\/h3>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>To receive data from our Wio Terminal, Blynk uses virtual pins that we can write to. We can later use these virtual pins to display the data on our dashboard in the Blynk app. In addition, we will also use Blynk.notify() to send a notification to our application in the event that movement is detected.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>void sendPIRDetect() {\n    if(digitalRead(PIR)) {\n        person_state = 1;\n        Blynk.virtualWrite(V0, person);\n        if (notify_me == 1 &amp;&amp; millis() - notifyMillis &gt; notifyTimeout) {\n            Blynk.notify(\"Movement detected.\");\n            notifyMillis = millis();\n        }\n    } else {\n        person_state = 0;\n        Blynk.virtualWrite(V0, absent);\n    }\n}<\/code><\/pre>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Here, we also use the person_state variable to record the presence of movement so that other parts of our program can respond accordingly. We will use this variable to control our LCD greeting screen later.<\/p>\n\n\n\n<p>Admittedly, I found while testing the code that these notifications can get annoying pretty quickly if we don\u2019t put some kind of limit on them. Hence, I added a timeout condition where the notification is only sent once per 20 seconds by default. I also added a toggle on the dashboard that would allow us to set if we want notifications to be delivered.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>To implement this toggle, we have to use virtual pins again.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>BLYNK_WRITE(V1) {\n    int pinValue = param.asInt();\n\n    \/\/ Debug: Check Toggle Inputs\n    Serial.print(\"Input Value: \");\n    Serial.println(pinValue);\n\n    \/\/ Toggle According to Pin Value\n    if (pinValue == 1) {\n        notify_me = 1;\n    } else {\n        notify_me = 0;\n    }\n}<\/code><\/pre>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>This simple bit of code is a callback that is run every time we toggle the button on our mobile phone. In this case, we simply switch the notify_me state variable between 0 and 1 according to the pin\u2019s value. This variable is then used in the sendPIRDetect() function to determine whether or not the notification should be sent.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Greeting our Guests with the LCD Display<\/strong><\/h3>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"338\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2021\/02\/Doorbell-Demo-GIF.gif\" alt=\"\" class=\"wp-image-40755\" \/><\/figure><\/div>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Since we have an LCD display built into our Wio Terminal, why not build a simple screen to let our guests know we\u2019re aware of their arrival?<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>if ( person_state == 0 &amp;&amp; (millis() - LCDmillis) &gt; LCDTimeout) {\n    eraseLCD();\n    digitalWrite(LCD_BACKLIGHT, LOW);\n}\n\nif (person_state == 1 &amp;&amp; (millis() - LCDmillis) &gt; LCDTimeout) {\n    digitalWrite(LCD_BACKLIGHT, HIGH);\n    LCDmillis = millis();\n    tft.setTextDatum(MC_DATUM);\n    tft.setFreeFont(FSSB18);\n    tft.drawString(\"Hello!\", 160, 100);\n    tft.setFreeFont(FSS9);\n    tft.drawString(\"A doorbell notification\", 160, 135);\n    tft.drawString(\"will be sent.\", 160, 155);\n}<\/code><\/pre>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Here, I\u2019ve added two additional conditional statements to our main loop. These statements continuously check for the person_state variable that we previously toggled, but are only run every 20 seconds to avoid erratic screen flickering.<\/p>\n\n\n\n<p>If the PIR sensor reads HIGH, we will display a message to let our guests know that we\u2019re being notified of their arrival. Otherwise, we will turn off our LCD backlight to save power with the following function call.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>digitalWrite(LCD_BACKLIGHT, LOW);<\/code><\/pre>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Note that the LCDmillis variable is only \u2018reset\u2019 with the on-state code block. This allows us the LCD to be turned on again immediately by any subsequent movement!<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Troubleshooting the Code<\/strong><\/h2>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>When it comes to IoT applications WiFi networks, microcontrollers can sometimes take awhile. If you\u2019re getting stuck, trying one of the following may help.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">1.&nbsp; Check WiFi Connectivity<\/h3>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Ensure that your WiFi SSID and Password are correct by uploading the following code and checking for connectivity.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>#include \"rpcWiFi.h\"\n \nconst char* ssid = \"yourNetworkName\";\nconst char* password =  \"yourNetworkPassword\";\n \nvoid setup() {\n    Serial.begin(115200);\n    while(!Serial); \/\/ Wait for Serial to be ready\n \n    \/\/ Set WiFi to station mode and disconnect from an AP if it was previously connected\n    WiFi.mode(WIFI_STA);\n    WiFi.disconnect();\n \n    Serial.println(\"Connecting to WiFi..\");\n    WiFi.begin(ssid, password);\n \n    while (WiFi.status() != WL_CONNECTED) {\n        delay(500);\n        Serial.println(\"Connecting to WiFi..\");\n        WiFi.begin(ssid, password);\n    }\n    Serial.println(\"Connected to the WiFi network\");\n    Serial.print(\"IP Address: \");\n    Serial.println (WiFi.localIP()); \/\/ prints out the device's IP address\n    }\n \nvoid loop() {\n \n}<\/code><\/pre>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">2.&nbsp; Reset your Wio Terminal<\/h3>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>You can do this by pulling downwards on the power button, then releasing it. Or, reupload your code in the Arduino IDE.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">3.&nbsp; Wait\u2026. And Try Again<\/h3>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>If all else fails, simply wait and try again later. Sometimes, connections to external servers can take awhile to be established.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>The Final Product<\/strong><\/h2>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Here we have the final product! An automatic doorbell that detects someone\u2019s presence with their movement, remote messages sent to our phone so we know when we have guests, as well as an LCD display to greet them!<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Here we see the PIR sensor and LCD screen&#8217;s greeting in action!<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"450\" src=\"https:\/\/blog.seeedstudio.com\/wp-content\/uploads\/2021\/02\/Doorbell-Demo-Video.gif\" alt=\"\" class=\"wp-image-40804\" \/><\/figure><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Meanwhile, the dashboard allows us to receive notifications and monitor the sensor.<\/p>\n\n\n\n<div style=\"height:15px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\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\/2021\/02\/ID-Photo-1-1030x687.jpg\" alt=\"\" class=\"wp-image-40752\" width=\"800\" srcset=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/ID-Photo-1-1030x687.jpg 1030w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/ID-Photo-1-300x200.jpg 300w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/ID-Photo-1-768x512.jpg 768w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/ID-Photo-1-1536x1024.jpg 1536w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/ID-Photo-1-2048x1365.jpg 2048w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/ID-Photo-1-1024x683.jpg 1024w, https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/ID-Photo-1-675x450.jpg 675w\" sizes=\"(max-width: 1030px) 100vw, 1030px\" \/><\/figure><\/div>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>And that concludes today&#8217;s tutorial. I hope you were able to follow along and build your very own Arduino smart doorbell with your Wio Terminal! You can easily tweak the existing code to give you alerts under a variety of circumstances, or even to send various hardware commands to your Wio Terminal remotely. In addition, you&#8217;ll find that there are a great variety of IoT applications that can be created with a MCU like the Wio Terminal, depending on what sensors we attach to them.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>If you&#8217;re keen to try other projects for the Wio Terminal, please visit the following links:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/blog.seeedstudio.com\/blog\/2021\/02\/04\/wio-terminal-arduino-customisable-timer-with-code\/\">Wio Terminal: Arduino Customisable Timer (with Code!)<\/a><\/li><li><a href=\"https:\/\/blog.seeedstudio.com\/blog\/2021\/01\/19\/tiny-ml-with-wio-terminal-1-intro\/\">Learn TinyML using Wio Terminal and Arduino IDE #1 Intro<\/a><\/li><li><a href=\"https:\/\/blog.seeedstudio.com\/blog\/2020\/06\/04\/resource-roundup-for-wio-terminal\/\">Resource Roundup for Wio Terminal: Tutorials, Reviews, and Projects from Community<\/a><\/li><\/ul>\n\n\n\n<div style=\"height:41px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this step by step tutorial, learn how to create your very own Arduino Smart<\/p>\n","protected":false},"author":3537,"featured_media":40750,"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,3003,3678],"class_list":["post-40731","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news","tag-arduino","tag-wio-terminal","tag-wio-terminal-project"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Wio Terminal: Arduino Smart Doorbell (with Code!) - Latest News from Seeed Studio<\/title>\n<meta name=\"description\" content=\"In this detailed tutorial, learn how to create your very own Arduino Smart Doorbell with your Wio Terminal that detects visitors and notifies you remotely!\" \/>\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\/2021\/02\/08\/wio-terminal-arduino-smart-doorbell-with-code\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Wio Terminal: Arduino Smart Doorbell (with Code!) - Latest News from Seeed Studio\" \/>\n<meta property=\"og:description\" content=\"In this detailed tutorial, learn how to create your very own Arduino Smart Doorbell with your Wio Terminal that detects visitors and notifies you remotely!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/08\/wio-terminal-arduino-smart-doorbell-with-code\/\" \/>\n<meta property=\"og:site_name\" content=\"Latest News from Seeed Studio\" \/>\n<meta property=\"article:published_time\" content=\"2021-02-08T10:03:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-18T05:38:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"3000\" \/>\n\t<meta property=\"og:image:height\" content=\"1750\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Jonathan Tan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jonathan Tan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/08\/wio-terminal-arduino-smart-doorbell-with-code\/\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/08\/wio-terminal-arduino-smart-doorbell-with-code\/\",\"name\":\"Wio Terminal: Arduino Smart Doorbell (with Code!) - Latest News from Seeed Studio\",\"isPartOf\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/08\/wio-terminal-arduino-smart-doorbell-with-code\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/08\/wio-terminal-arduino-smart-doorbell-with-code\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-1.png\",\"datePublished\":\"2021-02-08T10:03:08+00:00\",\"dateModified\":\"2021-02-18T05:38:06+00:00\",\"author\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/61e29862da8741ee517eacd92f4cd094\"},\"description\":\"In this detailed tutorial, learn how to create your very own Arduino Smart Doorbell with your Wio Terminal that detects visitors and notifies you remotely!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/08\/wio-terminal-arduino-smart-doorbell-with-code\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/08\/wio-terminal-arduino-smart-doorbell-with-code\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/08\/wio-terminal-arduino-smart-doorbell-with-code\/#primaryimage\",\"url\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-1.png\",\"contentUrl\":\"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-1.png\",\"width\":3000,\"height\":1750},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/08\/wio-terminal-arduino-smart-doorbell-with-code\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.seeedstudio.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Wio Terminal: Arduino Smart Doorbell (with Code!)\"}]},{\"@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\/61e29862da8741ee517eacd92f4cd094\",\"name\":\"Jonathan Tan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d8dd1a4a7882386e8818e110c9322897?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d8dd1a4a7882386e8818e110c9322897?s=96&r=g\",\"caption\":\"Jonathan Tan\"},\"url\":\"https:\/\/www.seeedstudio.com\/blog\/author\/jonathan-tan\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Wio Terminal: Arduino Smart Doorbell (with Code!) - Latest News from Seeed Studio","description":"In this detailed tutorial, learn how to create your very own Arduino Smart Doorbell with your Wio Terminal that detects visitors and notifies you remotely!","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\/2021\/02\/08\/wio-terminal-arduino-smart-doorbell-with-code\/","og_locale":"en_US","og_type":"article","og_title":"Wio Terminal: Arduino Smart Doorbell (with Code!) - Latest News from Seeed Studio","og_description":"In this detailed tutorial, learn how to create your very own Arduino Smart Doorbell with your Wio Terminal that detects visitors and notifies you remotely!","og_url":"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/08\/wio-terminal-arduino-smart-doorbell-with-code\/","og_site_name":"Latest News from Seeed Studio","article_published_time":"2021-02-08T10:03:08+00:00","article_modified_time":"2021-02-18T05:38:06+00:00","og_image":[{"width":3000,"height":1750,"url":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-1.png","type":"image\/png"}],"author":"Jonathan Tan","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Jonathan Tan","Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/08\/wio-terminal-arduino-smart-doorbell-with-code\/","url":"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/08\/wio-terminal-arduino-smart-doorbell-with-code\/","name":"Wio Terminal: Arduino Smart Doorbell (with Code!) - Latest News from Seeed Studio","isPartOf":{"@id":"https:\/\/www.seeedstudio.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/08\/wio-terminal-arduino-smart-doorbell-with-code\/#primaryimage"},"image":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/08\/wio-terminal-arduino-smart-doorbell-with-code\/#primaryimage"},"thumbnailUrl":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-1.png","datePublished":"2021-02-08T10:03:08+00:00","dateModified":"2021-02-18T05:38:06+00:00","author":{"@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/61e29862da8741ee517eacd92f4cd094"},"description":"In this detailed tutorial, learn how to create your very own Arduino Smart Doorbell with your Wio Terminal that detects visitors and notifies you remotely!","breadcrumb":{"@id":"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/08\/wio-terminal-arduino-smart-doorbell-with-code\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.seeedstudio.com\/blog\/2021\/02\/08\/wio-terminal-arduino-smart-doorbell-with-code\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/08\/wio-terminal-arduino-smart-doorbell-with-code\/#primaryimage","url":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-1.png","contentUrl":"https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-1.png","width":3000,"height":1750},{"@type":"BreadcrumbList","@id":"https:\/\/www.seeedstudio.com\/blog\/2021\/02\/08\/wio-terminal-arduino-smart-doorbell-with-code\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.seeedstudio.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Wio Terminal: Arduino Smart Doorbell (with Code!)"}]},{"@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\/61e29862da8741ee517eacd92f4cd094","name":"Jonathan Tan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.seeedstudio.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d8dd1a4a7882386e8818e110c9322897?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d8dd1a4a7882386e8818e110c9322897?s=96&r=g","caption":"Jonathan Tan"},"url":"https:\/\/www.seeedstudio.com\/blog\/author\/jonathan-tan\/"}]}},"modified_by":"Jonathan Tan","views":7027,"featured_image_urls":{"full":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-1.png",3000,1750,false],"thumbnail":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-1-80x80.png",80,80,true],"medium":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-1-300x175.png",300,175,true],"medium_large":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-1-768x448.png",640,373,true],"large":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-1-1030x601.png",640,373,true],"1536x1536":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-1-1536x896.png",1536,896,true],"2048x2048":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-1-2048x1195.png",2048,1195,true],"visody_icon":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-1.png",32,19,false],"magazine-7-slider-full":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-1-1536x1020.png",1536,1020,true],"magazine-7-slider-center":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-1-936x897.png",936,897,true],"magazine-7-featured":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-1-1024x597.png",1024,597,true],"magazine-7-medium":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-1-720x380.png",720,380,true],"magazine-7-medium-square":["https:\/\/www.seeedstudio.com\/blog\/wp-content\/uploads\/2021\/02\/Copy-of-Clean-1-675x450.png",675,450,true]},"author_info":{"display_name":"Jonathan Tan","author_link":"https:\/\/www.seeedstudio.com\/blog\/author\/jonathan-tan\/"},"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\/40731","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\/3537"}],"replies":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/comments?post=40731"}],"version-history":[{"count":28,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/40731\/revisions"}],"predecessor-version":[{"id":40808,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/posts\/40731\/revisions\/40808"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/media\/40750"}],"wp:attachment":[{"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/media?parent=40731"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/categories?post=40731"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.seeedstudio.com\/blog\/wp-json\/wp\/v2\/tags?post=40731"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}