{"id":5844,"date":"2021-05-07T13:17:58","date_gmt":"2021-05-07T20:17:58","guid":{"rendered":"https:\/\/www.circuitspecialists.com\/blog\/?p=5844"},"modified":"2021-07-30T11:38:18","modified_gmt":"2021-07-30T18:38:18","slug":"smart-house-project-part-2","status":"publish","type":"post","link":"https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/","title":{"rendered":"Smart House Project &#8211; Part 2"},"content":{"rendered":"\n<p>A <a href=\"\/blog\/smart-house-project-series\/\">smart house<\/a> should provide its occupants with more than just comfort. It should also provide a sense of security and a smart house is no different. For the sake of argument, a smart house should do more than just provide a passive defense system for stopping intruders. A smart house should be equipped with a sensor system that actively listens to outside noise.<\/p>\n\n\n\n<p>In Today&#8217;s project, we will use a speaker and a Piezo element as a sound sensor. If you are following along with the ARD-02 201 <a href=\"\/ard-02.html\">Arduino Basics Starter Kit<\/a>, this will be covered under these 2 lessons: Melody (pg.53) and Knock Sensor(pg.63). I will be referencing the information from these 2 lessons as they provide a great deal of information such as schematics, circuit and coding theory, explanation, etc.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Part list<\/h5>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2018\/01\/ard-02.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2018\/01\/ard-02.jpg\" alt=\"ARD-02 201 Arduino Basics Starter Kit\" class=\"wp-image-4401\" width=\"678\" height=\"678\" srcset=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2018\/01\/ard-02.jpg 1000w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2018\/01\/ard-02-150x150.jpg 150w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2018\/01\/ard-02-300x300.jpg 300w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2018\/01\/ard-02-768x768.jpg 768w\" sizes=\"auto, (max-width: 678px) 100vw, 678px\" \/><\/a><figcaption>ARD-02 201 Arduino Basics Starter Kit<\/figcaption><\/figure><\/div>\n\n\n\n<p>100 Ohm resistor <\/p>\n\n\n\n<p>Speaker<\/p>\n\n\n\n<p>1M Ohm resistor <\/p>\n\n\n\n<p>Piezo Buzzer <\/p>\n\n\n\n<p><a href=\"\/arduino-uno-r4-plus.html\">OSEPP Uno Board<\/a> <\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Sound Circuit<\/h5>\n\n\n\n<p>The sound circuit is fairly simple to assemble, the resistor connects to the speaker in series.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1947-1-scaled.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1947-1-1024x768.jpg\" alt=\"\" class=\"wp-image-5848\" srcset=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1947-1-1024x768.jpg 1024w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1947-1-300x225.jpg 300w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1947-1-768x576.jpg 768w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1947-1-1536x1152.jpg 1536w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1947-1-2048x1536.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>Plug the circuit into an Uno to make sure everything works. OSEPP provided the sound example code in this link<a href=\"http:\/\/osepp.com\/files\/osepp_201K.zip\"> http:\/\/osepp.com\/files\/osepp_201K.zip<\/a><\/p>\n\n\n\n<p>I will attach the schematic below for your reference or page 55 on the OSEPP handbook.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/Schematic.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1011\" height=\"715\" src=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/Schematic.png\" alt=\"\" class=\"wp-image-5874\" srcset=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/Schematic.png 1011w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/Schematic-300x212.png 300w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/Schematic-768x543.png 768w\" sizes=\"auto, (max-width: 1011px) 100vw, 1011px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>Now, we will try to build the same circuit with a slightly bigger speaker for our house.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1945-scaled.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1945-1024x768.jpg\" alt=\"\" class=\"wp-image-5849\" width=\"665\" height=\"499\" srcset=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1945-1024x768.jpg 1024w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1945-300x225.jpg 300w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1945-768x576.jpg 768w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1945-1536x1152.jpg 1536w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1945-2048x1536.jpg 2048w\" sizes=\"auto, (max-width: 665px) 100vw, 665px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>Finally, you can protect the resistor by covering it with a T3 heat shrink tube and then set it aside.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1948-1-scaled.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1948-1-1024x768.jpg\" alt=\"\" class=\"wp-image-5851\" srcset=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1948-1-1024x768.jpg 1024w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1948-1-300x225.jpg 300w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1948-1-768x576.jpg 768w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1948-1-1536x1152.jpg 1536w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1948-1-2048x1536.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div>\n\n\n\n<h5 class=\"wp-block-heading\">Knock Sensor Circuit<\/h5>\n\n\n\n<p>This circuit is also fairly simple to build and test out before installing in the house.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1949-scaled.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1949-1024x697.jpg\" alt=\"\" class=\"wp-image-5852\" width=\"861\" height=\"586\" srcset=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1949-1024x697.jpg 1024w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1949-300x204.jpg 300w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1949-768x523.jpg 768w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1949-1536x1045.jpg 1536w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1949-2048x1394.jpg 2048w\" sizes=\"auto, (max-width: 861px) 100vw, 861px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>I usually upload the provided code from OSEPP to make sure the system works before moving on to the next step.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1950-1-scaled.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1950-1-1024x768.jpg\" alt=\"\" class=\"wp-image-5854\" width=\"801\" height=\"601\" srcset=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1950-1-1024x768.jpg 1024w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1950-1-300x225.jpg 300w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1950-1-768x576.jpg 768w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1950-1-1536x1152.jpg 1536w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1950-1-2048x1536.jpg 2048w\" sizes=\"auto, (max-width: 801px) 100vw, 801px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>Now we need to build the sound sensor so that it can go into the smart house project. The resistor is connected parallel to the Piezo Buzzer.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1951-scaled.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1951-1024x768.jpg\" alt=\"\" class=\"wp-image-5855\" width=\"789\" height=\"592\" srcset=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1951-1024x768.jpg 1024w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1951-300x225.jpg 300w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1951-768x576.jpg 768w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1951-1536x1152.jpg 1536w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1951-2048x1536.jpg 2048w\" sizes=\"auto, (max-width: 789px) 100vw, 789px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>Fold the wires down so the<a href=\"\/soft-tube-heat-shrink-tubing\"> heat shrink tube<\/a> can go over it. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1953-1-scaled.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1953-1-edited-scaled.jpg\" alt=\"\" class=\"wp-image-5861\" width=\"764\" height=\"572\" srcset=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1953-1-edited-scaled.jpg 2560w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1953-1-edited-300x225.jpg 300w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1953-1-edited-1024x768.jpg 1024w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1953-1-edited-768x576.jpg 768w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1953-1-edited-1536x1152.jpg 1536w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1953-1-edited-2048x1536.jpg 2048w\" sizes=\"auto, (max-width: 764px) 100vw, 764px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>The final product should look like the photo below.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1957-1-scaled.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1957-1-1024x768.jpg\" alt=\"\" class=\"wp-image-5863\" srcset=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1957-1-1024x768.jpg 1024w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1957-1-300x225.jpg 300w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1957-1-768x576.jpg 768w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1957-1-1536x1152.jpg 1536w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1957-1-2048x1536.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>Next, install the Sound system and the Knock Sensor to the house. Give yourself a pat on the back because the hard part is done. We will go over the code below.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1961-1-scaled.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1961-1-1024x768.jpg\" alt=\"\" class=\"wp-image-5865\" width=\"829\" height=\"621\" srcset=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1961-1-1024x768.jpg 1024w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1961-1-300x225.jpg 300w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1961-1-768x576.jpg 768w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1961-1-1536x1152.jpg 1536w, https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/IMG_1961-1-2048x1536.jpg 2048w\" sizes=\"auto, (max-width: 829px) 100vw, 829px\" \/><\/a><\/figure><\/div>\n\n\n\n<h5 class=\"wp-block-heading\">The Code<\/h5>\n\n\n\n<p>I will go over what changes only and the full code file will be attached below in case you need it. <\/p>\n\n\n\n<p>In the Light Sensor Code, I change Second_Floor_LED to pin 5 so that I can use analogWrite instead of the digitalWrite function. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>int First_Floor_LED = 3;\nint Second_Floor_LED = 5;\n\nvoid LightControl(int LightLevel)\n{\n  int Light = map(LightLevel,0,5,0,250);\n  \n    analogWrite(First_Floor_LED, Light);\n    analogWrite(Second_Floor_LED,Light);\n\n\n}\n\nvoid LightSensor()\n{\n      int analogValue;\n    int range;\n\n\/\/ read our photocell\nanalogValue = analogRead(photocellPin);\n\/\/ map the sensor range to a range of four options\nrange = map(analogValue, sensorMin, sensorMax, 0, 3);\n\n\/\/ do something different depending on the \n\/\/ range value\nswitch (range) \n{\n    \/\/ Dark turn on the light \n    case 0:\n        Serial.println(\"dark\");\n        LightControl(5);\n\/\/        digitalWrite(First_Floor_LED, HIGH);\n\/\/        digitalWrite(Second_Floor_LED, HIGH);\n        break;\n    \/\/ Dim turn on the light \n    case 1:\n        Serial.println(\"dim\");\n        LightControl(5);\n\/\/        digitalWrite(First_Floor_LED, HIGH);\n\/\/        digitalWrite(Second_Floor_LED, HIGH);\n        break;\n    \/\/ Medium turn off the ligh \n    case 2: \n        Serial.println(\"medium\");\n        LightControl(0);\n\/\/        digitalWrite(First_Floor_LED, LOW);\n\/\/        digitalWrite(Second_Floor_LED, LOW);\n        break;\n    \/\/ Bright Turn off the ligh \n    case 3:\n        Serial.println(\"bright\");\n        LightControl(0);\n\/\/        digitalWrite(First_Floor_LED, LOW);\n\/\/        digitalWrite(Second_Floor_LED, LOW);\n        break;\n}\n\n\/\/ wait 0.25s before reading the photocell again\ndelay(25);\n}<\/code><\/pre>\n\n\n\n<p>The Alarm system <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ iterate over the notes of the melody\nfor (int thisNote = 0; thisNote &lt; numberOfNotes; thisNote++)\n{\n    \/\/ grab our note and note duration from our array\n    int thisNoteTone = melody&#91;thisNote]&#91;0];\n    int thisNoteDuration = melody&#91;thisNote]&#91;1];\n\n    \/\/ to calculate the note duration in ms\n    int noteDurationMS = 100 \/ thisNoteDuration;\n\n    \/\/ play the note\n    tone(speakerPin, thisNoteTone, noteDurationMS);\nvoid Alarm_System()\n{\n   int analogValue;\n\n    \/\/ read the sensor and store it in the variable sensorReading:\n    analogValue = analogRead(piezoPin);\n    Serial.print (\"Loud= \");Serial.println(analogValue);\n    \/\/ if the sensor reading is greater than the threshold:\n    if (analogValue &gt; threshold)\n    {\n        \/\/ send the string \"Knock!\" back to the computer, followed by newline\n        \/\/Serial.println(\"Knock!\");\n    for(int i = 0; i&lt;10; i++) \n    { \n    alarm_sound();\n    LightControl(5);\n    delay(10);\n    }\n    \n    }\n        digitalWrite(First_Floor_LED, LOW);\n        digitalWrite(Second_Floor_LED, LOW);\n    \/\/ delay to avoid overloading the serial port buffer\n    delay(10);\n}\nvoid alarm_sound()\n{\n         \/\/ figure out the number of notes in our melody\n    int numberOfNotes = sizeof(melody) \/ sizeof(melody&#91;0]);\n\n    \/\/ iterate over the notes of the melody\n    for (int thisNote = 0; thisNote &lt; numberOfNotes; thisNote++)\n    {\n        \/\/ grab our note and note duration from our array\n        int thisNoteTone = melody&#91;thisNote]&#91;0];\n        int thisNoteDuration = melody&#91;thisNote]&#91;1];\n\n        \/\/ to calculate the note duration in ms\n        int noteDurationMS = 100 \/ thisNoteDuration;\n\n        \/\/ play the note\n        tone(speakerPin, thisNoteTone, noteDurationMS);\n\n        \/\/ to distinguish the notes, set a minimum time between them.\n        \/\/ the note's duration + 30% seems to work well:\n        delay(noteDurationMS * 1.30);\n    }\n}<\/code><\/pre>\n\n\n\n<p>The Welcome song from the OSEPP source code <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>int WelcomeSong()\n{\n    int numberOfNotes = sizeof(melody) \/ sizeof(melody&#91;0]);\n    for (int thisNote = 0; thisNote &lt; numberOfNotes; thisNote++)\n    {\n        int thisNoteTone = melody&#91;thisNote]&#91;0];\n        int thisNoteDuration = melody&#91;thisNote]&#91;1];\n        int noteDurationMS = 1000 \/ thisNoteDuration;\n        \/\/ play the note\n        tone(speakerPin, thisNoteTone, noteDurationMS);\n        delay(noteDurationMS * 1.30);\n    }\n}<\/code><\/pre>\n\n\n\n<p>The full code<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/Project: Smart House \n\n\/\/ include our list of note pitches\n#include \"pitches.h\"\n\nint First_Floor_LED = 3;\nint Second_Floor_LED = 5;\n\n\/\/ the photocell voltage divider pin\nint photocellPin = A0;\nint piezoPin = A1;\n\n\/\/ the pin the speaker is attached to\nint speakerPin = 8;\n\n\nconst int sensorMin = 0;\n\/\/ sensor maximum, discovered through experiment\nconst int sensorMax = 800;\nconst int threshold = 10; \n\n\/\/ the notes in our melody and their duration in fractions of a second\n\/\/ e.g. quarter note = 4, eighth note = 8, etc.\nconst int melody&#91;]&#91;2] = \n{\n    {NOTE_C4, 4},\n    {NOTE_G3, 8},\n    {NOTE_G3, 8},\n    {NOTE_A3, 4},\n    {NOTE_G3, 4},\n    {NOTE_BLANK, 4},\n    {NOTE_B3, 4},\n    {NOTE_C4, 4}\n};\n\nvoid setup()\n{\n    \/\/ set up serial at 9600 baud   \n    Serial.begin(9600);\n    pinMode(First_Floor_LED, OUTPUT);\n    pinMode(Second_Floor_LED, OUTPUT);\n    WelcomeSong();\n}\n\nvoid loop()\n{\n  LightSensor();\n Alarm_System();\n}\n\nvoid Alarm_System()\n{\n   int analogValue;\n\n    \/\/ read the sensor and store it in the variable sensorReading:\n    analogValue = analogRead(piezoPin);\n    Serial.print (\"Loud= \");Serial.println(analogValue);\n    \/\/ if the sensor reading is greater than the threshold:\n    if (analogValue &gt; threshold)\n    {\n        \/\/ send the string \"Knock!\" back to the computer, followed by newline\n        \/\/Serial.println(\"Knock!\");\n    for(int i = 0; i&lt;10; i++) \n    { \n    alarm_sound();\n    LightControl(5);\n    delay(10);\n    }\n    \n    }\n        digitalWrite(First_Floor_LED, LOW);\n        digitalWrite(Second_Floor_LED, LOW);\n    \/\/ delay to avoid overloading the serial port buffer\n    delay(10);\n}\nvoid alarm_sound()\n{\n         \/\/ figure out the number of notes in our melody\n    int numberOfNotes = sizeof(melody) \/ sizeof(melody&#91;0]);\n\n    \/\/ iterate over the notes of the melody\n    for (int thisNote = 0; thisNote &lt; numberOfNotes; thisNote++)\n    {\n        \/\/ grab our note and note duration from our array\n        int thisNoteTone = melody&#91;thisNote]&#91;0];\n        int thisNoteDuration = melody&#91;thisNote]&#91;1];\n\n        \/\/ to calculate the note duration in ms\n        int noteDurationMS = 100 \/ thisNoteDuration;\n\n        \/\/ play the note\n        tone(speakerPin, thisNoteTone, noteDurationMS);\n\n        \/\/ to distinguish the notes, set a minimum time between them.\n        \/\/ the note's duration + 30% seems to work well:\n        delay(noteDurationMS * 1.30);\n    }\n}\n\nint WelcomeSong()\n{\n    int numberOfNotes = sizeof(melody) \/ sizeof(melody&#91;0]);\n    for (int thisNote = 0; thisNote &lt; numberOfNotes; thisNote++)\n    {\n        int thisNoteTone = melody&#91;thisNote]&#91;0];\n        int thisNoteDuration = melody&#91;thisNote]&#91;1];\n        int noteDurationMS = 1000 \/ thisNoteDuration;\n        \/\/ play the note\n        tone(speakerPin, thisNoteTone, noteDurationMS);\n        delay(noteDurationMS * 1.30);\n    }\n}\n\nvoid LightSensor()\n{\n      int analogValue;\n    int range;\n\n\/\/ read our photocell\nanalogValue = analogRead(photocellPin);\n\/\/ map the sensor range to a range of four options\nrange = map(analogValue, sensorMin, sensorMax, 0, 3);\n\n\/\/ do something different depending on the \n\/\/ range value\nswitch (range) \n{\n    \/\/ Dark turn on the light \n    case 0:\n        Serial.println(\"dark\");\n        LightControl(5);\n\/\/        digitalWrite(First_Floor_LED, HIGH);\n\/\/        digitalWrite(Second_Floor_LED, HIGH);\n        break;\n    \/\/ Dim turn on the light \n    case 1:\n        Serial.println(\"dim\");\n        LightControl(5);\n\/\/        digitalWrite(First_Floor_LED, HIGH);\n\/\/        digitalWrite(Second_Floor_LED, HIGH);\n        break;\n    \/\/ Medium turn off the ligh \n    case 2: \n        Serial.println(\"medium\");\n        LightControl(0);\n\/\/        digitalWrite(First_Floor_LED, LOW);\n\/\/        digitalWrite(Second_Floor_LED, LOW);\n        break;\n    \/\/ Bright Turn off the ligh \n    case 3:\n        Serial.println(\"bright\");\n        LightControl(0);\n\/\/        digitalWrite(First_Floor_LED, LOW);\n\/\/        digitalWrite(Second_Floor_LED, LOW);\n        break;\n}\n\n\/\/ wait 0.25s before reading the photocell again\ndelay(25);\n}\n\nvoid LightControl(int LightLevel)\n{\n  int Light = map(LightLevel,0,5,0,250);\n  \n    analogWrite(First_Floor_LED, Light);\n    analogWrite(Second_Floor_LED,Light);\n\n\n}<\/code><\/pre>\n\n\n\n<p>The video below demonstrates how the active sensor working to detect disturbing noises at night.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Smart House Project Part 2\" width=\"800\" height=\"450\" src=\"https:\/\/www.youtube.com\/embed\/mGNzIvM-GaY?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\">Conclusion <\/h5>\n\n\n\n<p>The <a href=\"https:\/\/www.gsa.gov\/buying-selling\/products-services\/security-protection\/security-systems\">Security System<\/a> adds another layer to the smart house project.&nbsp; It provides its occupants with comfort yet security by actively listening to the outdoor environment at night.&nbsp; Furthermore, the smart house can then notify the occupants about the disturbance when no one is home. The house of the future is environmentally friendly yet doesn&#8217;t sacrifice its occupant&#8217;s comfort. In the next chapter, we will learn how a smart house can make an environmentally friendly air conditioning system.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A smart house should provide its occupants with more than just comfort. It should also provide a sense of security<\/p>\n","protected":false},"author":10687,"featured_media":5867,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"colormag_page_layout":"default_layout","footnotes":""},"categories":[1,124,8,21,240,135],"tags":[129,133,132,143],"class_list":["post-5844","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-all-posts","category-arduino","category-diy","category-education-kits","category-experiments","category-tutorial-how-to","tag-arduino","tag-diy","tag-makers","tag-prototyping"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Smart House Project - Part 2 | Simply Smarter Circuitry Blog<\/title>\n<meta name=\"description\" content=\"A house should provide its occupants with more than just comfort, it should also provide a sense of security and a smart house is no different.\" \/>\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.circuitspecialists.com\/blog\/smart-house-project-part-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Smart House Project - Part 2 | Simply Smarter Circuitry Blog\" \/>\n<meta property=\"og:description\" content=\"A house should provide its occupants with more than just comfort, it should also provide a sense of security and a smart house is no different.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Simply Smarter Circuitry Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/CircuitSpecialists\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-05-07T20:17:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-07-30T18:38:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/2021-05-07.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"562\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Khang\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CircuitSpecial\" \/>\n<meta name=\"twitter:site\" content=\"@CircuitSpecial\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Khang\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/\"},\"author\":{\"name\":\"Khang\",\"@id\":\"https:\/\/www.circuitspecialists.com\/blog\/#\/schema\/person\/2004b049c7f4ad1ef1c677c13230001e\"},\"headline\":\"Smart House Project &#8211; Part 2\",\"datePublished\":\"2021-05-07T20:17:58+00:00\",\"dateModified\":\"2021-07-30T18:38:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/\"},\"wordCount\":535,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.circuitspecialists.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/2021-05-07.jpg\",\"keywords\":[\"Arduino\",\"DIY\",\"Makers\",\"Prototyping\"],\"articleSection\":[\"All Posts\",\"Arduino\",\"DIY\",\"Education Kits\",\"Experiments\",\"Tutorial \/ How-to\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/\",\"url\":\"https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/\",\"name\":\"Smart House Project - Part 2 | Simply Smarter Circuitry Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.circuitspecialists.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/2021-05-07.jpg\",\"datePublished\":\"2021-05-07T20:17:58+00:00\",\"dateModified\":\"2021-07-30T18:38:18+00:00\",\"description\":\"A house should provide its occupants with more than just comfort, it should also provide a sense of security and a smart house is no different.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/#primaryimage\",\"url\":\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/2021-05-07.jpg\",\"contentUrl\":\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/2021-05-07.jpg\",\"width\":1000,\"height\":562,\"caption\":\"Blog\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.circuitspecialists.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Smart House Project &#8211; Part 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.circuitspecialists.com\/blog\/#website\",\"url\":\"https:\/\/www.circuitspecialists.com\/blog\/\",\"name\":\"Simply Smarter Circuitry Blog\",\"description\":\"How To&#039;s, Reviews, and Product News from Circuit Specialists HQ.\",\"publisher\":{\"@id\":\"https:\/\/www.circuitspecialists.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.circuitspecialists.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.circuitspecialists.com\/blog\/#organization\",\"name\":\"Circuit Specialists\",\"url\":\"https:\/\/www.circuitspecialists.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.circuitspecialists.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2016\/03\/csi.jpg\",\"contentUrl\":\"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2016\/03\/csi.jpg\",\"width\":120,\"height\":120,\"caption\":\"Circuit Specialists\"},\"image\":{\"@id\":\"https:\/\/www.circuitspecialists.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/CircuitSpecialists\/\",\"https:\/\/x.com\/CircuitSpecial\",\"https:\/\/www.youtube.com\/channel\/UCG87WTqDKIqA704uqjumJgg\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.circuitspecialists.com\/blog\/#\/schema\/person\/2004b049c7f4ad1ef1c677c13230001e\",\"name\":\"Khang\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.circuitspecialists.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ffe2b76fa2901ed9a217ed89e6528178?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ffe2b76fa2901ed9a217ed89e6528178?s=96&r=g\",\"caption\":\"Khang\"},\"url\":\"https:\/\/www.circuitspecialists.com\/blog\/author\/khang\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Smart House Project - Part 2 | Simply Smarter Circuitry Blog","description":"A house should provide its occupants with more than just comfort, it should also provide a sense of security and a smart house is no different.","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.circuitspecialists.com\/blog\/smart-house-project-part-2\/","og_locale":"en_US","og_type":"article","og_title":"Smart House Project - Part 2 | Simply Smarter Circuitry Blog","og_description":"A house should provide its occupants with more than just comfort, it should also provide a sense of security and a smart house is no different.","og_url":"https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/","og_site_name":"Simply Smarter Circuitry Blog","article_publisher":"https:\/\/www.facebook.com\/CircuitSpecialists\/","article_published_time":"2021-05-07T20:17:58+00:00","article_modified_time":"2021-07-30T18:38:18+00:00","og_image":[{"width":1000,"height":562,"url":"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/2021-05-07.jpg","type":"image\/jpeg"}],"author":"Khang","twitter_card":"summary_large_image","twitter_creator":"@CircuitSpecial","twitter_site":"@CircuitSpecial","twitter_misc":{"Written by":"Khang","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/#article","isPartOf":{"@id":"https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/"},"author":{"name":"Khang","@id":"https:\/\/www.circuitspecialists.com\/blog\/#\/schema\/person\/2004b049c7f4ad1ef1c677c13230001e"},"headline":"Smart House Project &#8211; Part 2","datePublished":"2021-05-07T20:17:58+00:00","dateModified":"2021-07-30T18:38:18+00:00","mainEntityOfPage":{"@id":"https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/"},"wordCount":535,"commentCount":0,"publisher":{"@id":"https:\/\/www.circuitspecialists.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/2021-05-07.jpg","keywords":["Arduino","DIY","Makers","Prototyping"],"articleSection":["All Posts","Arduino","DIY","Education Kits","Experiments","Tutorial \/ How-to"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/","url":"https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/","name":"Smart House Project - Part 2 | Simply Smarter Circuitry Blog","isPartOf":{"@id":"https:\/\/www.circuitspecialists.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/#primaryimage"},"image":{"@id":"https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/2021-05-07.jpg","datePublished":"2021-05-07T20:17:58+00:00","dateModified":"2021-07-30T18:38:18+00:00","description":"A house should provide its occupants with more than just comfort, it should also provide a sense of security and a smart house is no different.","breadcrumb":{"@id":"https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/#primaryimage","url":"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/2021-05-07.jpg","contentUrl":"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2021\/05\/2021-05-07.jpg","width":1000,"height":562,"caption":"Blog"},{"@type":"BreadcrumbList","@id":"https:\/\/www.circuitspecialists.com\/blog\/smart-house-project-part-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.circuitspecialists.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Smart House Project &#8211; Part 2"}]},{"@type":"WebSite","@id":"https:\/\/www.circuitspecialists.com\/blog\/#website","url":"https:\/\/www.circuitspecialists.com\/blog\/","name":"Simply Smarter Circuitry Blog","description":"How To&#039;s, Reviews, and Product News from Circuit Specialists HQ.","publisher":{"@id":"https:\/\/www.circuitspecialists.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.circuitspecialists.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.circuitspecialists.com\/blog\/#organization","name":"Circuit Specialists","url":"https:\/\/www.circuitspecialists.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.circuitspecialists.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2016\/03\/csi.jpg","contentUrl":"https:\/\/www.circuitspecialists.com\/blog\/wp-content\/uploads\/2016\/03\/csi.jpg","width":120,"height":120,"caption":"Circuit Specialists"},"image":{"@id":"https:\/\/www.circuitspecialists.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/CircuitSpecialists\/","https:\/\/x.com\/CircuitSpecial","https:\/\/www.youtube.com\/channel\/UCG87WTqDKIqA704uqjumJgg"]},{"@type":"Person","@id":"https:\/\/www.circuitspecialists.com\/blog\/#\/schema\/person\/2004b049c7f4ad1ef1c677c13230001e","name":"Khang","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.circuitspecialists.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ffe2b76fa2901ed9a217ed89e6528178?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ffe2b76fa2901ed9a217ed89e6528178?s=96&r=g","caption":"Khang"},"url":"https:\/\/www.circuitspecialists.com\/blog\/author\/khang\/"}]}},"_links":{"self":[{"href":"https:\/\/www.circuitspecialists.com\/blog\/wp-json\/wp\/v2\/posts\/5844","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.circuitspecialists.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.circuitspecialists.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.circuitspecialists.com\/blog\/wp-json\/wp\/v2\/users\/10687"}],"replies":[{"embeddable":true,"href":"https:\/\/www.circuitspecialists.com\/blog\/wp-json\/wp\/v2\/comments?post=5844"}],"version-history":[{"count":14,"href":"https:\/\/www.circuitspecialists.com\/blog\/wp-json\/wp\/v2\/posts\/5844\/revisions"}],"predecessor-version":[{"id":6148,"href":"https:\/\/www.circuitspecialists.com\/blog\/wp-json\/wp\/v2\/posts\/5844\/revisions\/6148"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.circuitspecialists.com\/blog\/wp-json\/wp\/v2\/media\/5867"}],"wp:attachment":[{"href":"https:\/\/www.circuitspecialists.com\/blog\/wp-json\/wp\/v2\/media?parent=5844"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.circuitspecialists.com\/blog\/wp-json\/wp\/v2\/categories?post=5844"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.circuitspecialists.com\/blog\/wp-json\/wp\/v2\/tags?post=5844"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}