{"id":2127,"date":"2016-02-29T23:32:14","date_gmt":"2016-02-29T22:32:14","guid":{"rendered":"https:\/\/playembedded.org\/?p=2127"},"modified":"2021-07-29T11:14:50","modified_gmt":"2021-07-29T09:14:50","slug":"an-object-counter-using-an-ir-sensor-and-arduino","status":"publish","type":"post","link":"https:\/\/playembedded.org\/blog\/an-object-counter-using-an-ir-sensor-and-arduino\/","title":{"rendered":"An object counter using an IR sensor and Arduino"},"content":{"rendered":"<head><style>\r\n.step-further-content {\r\n    width:100%; \r\n    padding:10px 20px; \r\n    margin:10px 0; \r\n    color:#1c7f8c; \r\n    background-color:#cef0f4; \r\n    border: 1px solid #38c5d8; \r\n    border-radius:4px;\r\n}\r\n  \r\n.step-further-content a {\r\n    font-weight:bold; \r\n    color: #a83800;\r\n}\r\n  \r\n.step-further-content b {\r\n    font-weight:bold; \r\n} \r\n<\/style>\r\n<\/head><div class=\"step-further-content\">Are you interested to <b>become an expert of embedded systems<\/b>? You definitely <b>should know<\/b> how to deal with <b>ARM Cortex<\/b> architecture and <b>RTOSes<\/b>. We have <b>free courses<\/b> to learn how to deal with STM32 and ChibiOS which would guide you <b>step by step<\/b>. <a href=\"https:\/\/playembedded.org\/how-to-start\/\" title=\"How to start with STM32 and ChibiOS\">Ready to do a step further?<\/a><\/div>\n<h3 id=\"1_About\" class=\"level_1\">About<\/h3>\n<figure id=\"attachment_2604\" aria-describedby=\"caption-attachment-2604\" style=\"width: 150px\" class=\"wp-caption alignright\"><a href=\"https:\/\/playembedded.org\/wp-content\/uploads\/2016\/04\/art004_Demo_clip.jpg\" rel=\"attachment wp-att-2604\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2604 size-thumbnail\" src=\"https:\/\/playembedded.org\/wp-content\/uploads\/2016\/04\/art004_Demo_clip-150x110.jpg\" alt=\"A counter system\" width=\"150\" height=\"110\" srcset=\"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art004_Demo_clip-150x110.jpg 150w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art004_Demo_clip-300x220.jpg 300w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art004_Demo_clip-24x18.jpg 24w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art004_Demo_clip-36x26.jpg 36w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art004_Demo_clip-48x35.jpg 48w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art004_Demo_clip.jpg 720w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\"><\/a><figcaption id=\"caption-attachment-2604\" class=\"wp-caption-text\">Example of a counter system.<\/figcaption><\/figure>\n<p>In this article we will resume the topic started with in &ldquo;<a href=\"https:\/\/playembedded.org\/detecting-obstacle-with-ir-sensor-and-arduino\/\" target=\"_blank\" rel=\"noopener\">Detecting obstacle with IR Sensor and Arduino<\/a>&rdquo;. More in details, we are going to use the IR sensor like an objects counter.<\/p>\n<p>The counter application is often used for:<\/p>\n<ul>\n<li>counting people traversing a certain passage or entrance. For example, in commercial buildings there are gates which control user access or presence often used to optimize energy consumption;<\/li>\n<li>counting objects or merchandise in industrial sector;<\/li>\n<li>etc.<\/li>\n<\/ul>\n<p>A counter can be made not only with IR technology but also with thermal imaging systems that use an array of sensors which&nbsp;detect heat sources or using machine&nbsp;vision which usually requires&nbsp;complex image processing algorithms.<!--more--><\/p>\n<h4 id=\"2_Introducing_the_application_a_counter_with_IR_technology\" class=\"level_2\">Introducing the application: a counter with IR technology<\/h4>\n<p>The distance from the object is very important and in some cases the IR sensor is not suitable for these applications. If the distance from the object is greater than 20-30cm, the ultrasonic sensor can be a better choice.<\/p>\n<p>We need to know when the IR sensor changes its state from HIGH to LOW and count how many times this transition happens: this is called <i>state change detection<\/i>. For more information on operation principle of the IR sensor we suggest to read&nbsp;the <a href=\"https:\/\/playembedded.org\/detecting-obstacle-with-ir-sensor-and-arduino\/\" target=\"_blank\" rel=\"noopener\">main article<\/a>.<\/p>\n<h3 id=\"3_A_bidirectional_counter\" class=\"level_1\">A&nbsp;bidirectional counter<\/h3>\n<p>High end counters use sophisticated hardware for counting process. Our project is a simple objects counter based on Arduino and two IR sensors. More in details, it is a 0 to 9 counter in which the first sensor is used to count ingoing people, the second those outgoing. The difference (IN &ndash; OUT) is shown&nbsp;on a 7-segments display.<\/p>\n<h4 id=\"4_Hardware_description_a_7_segments_display\" class=\"level_2\">Hardware description: a&nbsp;7-segments display<\/h4>\n<figure id=\"attachment_2603\" aria-describedby=\"caption-attachment-2603\" style=\"width: 150px\" class=\"wp-caption alignright\"><a href=\"https:\/\/playembedded.org\/wp-content\/uploads\/2016\/04\/art004_7segments_display.jpg\" rel=\"attachment wp-att-2603\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2603 size-thumbnail\" src=\"https:\/\/playembedded.org\/wp-content\/uploads\/2016\/04\/art004_7segments_display-150x54.jpg\" alt=\"7-segment display\" width=\"150\" height=\"54\" srcset=\"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art004_7segments_display-150x54.jpg 150w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art004_7segments_display-300x108.jpg 300w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art004_7segments_display-1024x369.jpg 1024w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art004_7segments_display-1200x432.jpg 1200w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art004_7segments_display-24x9.jpg 24w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art004_7segments_display-36x13.jpg 36w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art004_7segments_display-48x17.jpg 48w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art004_7segments_display.jpg 1282w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\"><\/a><figcaption id=\"caption-attachment-2603\" class=\"wp-caption-text\">A 7-segment display and its pin-out.<\/figcaption><\/figure>\n<p>Focusing on the <i>7-segments display<\/i> <b>SMA42056,<\/b>&nbsp;this&nbsp;is an electronic component designed to for display numbers and often&nbsp;used in digital clocks, electronic meters and other kind of numeric displays.<\/p>\n<p>The SMA42056 model is a common cathode 7-segments display with eventually an additional&nbsp;segment called decimal point or simply dot, represented by the P letter (See Fig.2), which is used for displaying non-integer numbers. Each segment is just a simple LED, and is often represented by the letters from A to G.&nbsp;The 7-segment display doesn&rsquo;t embed a series resistor for each LED and driving them with a constant DC voltage can permanently damage junctions: to avoid this&nbsp;we will use a series resistor of 220&Omega; for each LED.<\/p>\n<h3 id=\"5_Demo_Explained_A_bidirectional_counter\" class=\"level_1\">Demo Explained:&nbsp;A&nbsp;bidirectional counter<\/h3>\n<h4 id=\"6_What_it_has_to_do_and_what_is_the_necessary\" class=\"level_2\">What it has to do and what is the necessary<\/h4>\n<figure id=\"attachment_2605\" aria-describedby=\"caption-attachment-2605\" style=\"width: 300px\" class=\"wp-caption alignright\"><a href=\"https:\/\/playembedded.org\/wp-content\/uploads\/2016\/04\/art004_demo01_IRsensor_counter.jpg\" rel=\"attachment wp-att-2605\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2605 size-medium\" src=\"https:\/\/playembedded.org\/wp-content\/uploads\/2016\/04\/art004_demo01_IRsensor_counter-300x169.jpg\" alt=\"Object counter demo setup\" width=\"300\" height=\"169\" srcset=\"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art004_demo01_IRsensor_counter-300x169.jpg 300w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art004_demo01_IRsensor_counter-150x84.jpg 150w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art004_demo01_IRsensor_counter-1024x576.jpg 1024w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art004_demo01_IRsensor_counter-24x13.jpg 24w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art004_demo01_IRsensor_counter-36x20.jpg 36w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art004_demo01_IRsensor_counter-48x27.jpg 48w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/art004_demo01_IRsensor_counter.jpg 1080w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\"><\/a><figcaption id=\"caption-attachment-2605\" class=\"wp-caption-text\">The setup of the Object Counter demo.<\/figcaption><\/figure>\n<p>This proposed demo&nbsp;counts&nbsp;non-transparent&nbsp;objects which are traversing two&nbsp;IR gate: the first gate produce an increment on a total counter, the second produce a decrement. Since our simple demo uses a one digit display&nbsp;our application checks that two things have occurred:<\/p>\n<ol>\n<li>The counting must not be represented by a negative number;<\/li>\n<li>The counting must not be represented by a number greater than 9;<\/li>\n<\/ol>\n<p>Our BOM (Bill of Materials) is:<\/p>\n<ul>\n<li><b>Arduino UNO board<\/b>;<\/li>\n<li><b>2 x IR sensor fc-51<\/b>;<\/li>\n<li><b>1 x 7-segments display SMA42056<\/b>;<\/li>\n<li><b>8 x R = 220&Omega;<\/b>.<\/li>\n<\/ul>\n<h4 id=\"7_From_schematic_to_code\" class=\"level_2\">From schematic to code<\/h4>\n<figure id=\"attachment_3575\" aria-describedby=\"caption-attachment-3575\" style=\"width: 300px\" class=\"wp-caption alignright\"><a href=\"https:\/\/playembedded.org\/wp-content\/uploads\/2016\/05\/Object-counter-demo-schematic.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-3575\" src=\"https:\/\/playembedded.org\/wp-content\/uploads\/2016\/05\/Object-counter-demo-schematic-300x182.jpg\" alt=\"Object counter demo schematic\" width=\"300\" height=\"182\" srcset=\"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/05\/Object-counter-demo-schematic-300x182.jpg 300w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/05\/Object-counter-demo-schematic-150x91.jpg 150w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/05\/Object-counter-demo-schematic-1024x622.jpg 1024w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/05\/Object-counter-demo-schematic-1200x729.jpg 1200w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/05\/Object-counter-demo-schematic-24x15.jpg 24w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/05\/Object-counter-demo-schematic-36x22.jpg 36w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/05\/Object-counter-demo-schematic-48x29.jpg 48w, https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/05\/Object-counter-demo-schematic.jpg 1680w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\"><\/a><figcaption id=\"caption-attachment-3575\" class=\"wp-caption-text\">The schematic used in the object counter demo<\/figcaption><\/figure>\n<p>To drive the&nbsp;7 segment display we need for 7 digital output PINs as shown in Fig.4. We also need to read information from our two IR sensors. This requires to use 9 digital pins.<\/p>\n<p>In our case we have used the pin from D2 to D10 of our Arduino. To make code much more clear we have defined PIN numbers assigning them a proper name. Note that, parameters which are constant at run time and, consequently, defined at compile time, we are using preprocessor directives.<\/p>\n<p>Using the &ldquo;<em>define<\/em>&rdquo; directive we are&nbsp;not only reducing&nbsp;memory occupation, but also optimizing&nbsp;the program execution.<\/p>\n<p>We are defined&nbsp;the digital pins (from D2 to D8) we are going to use to drive our display as DISP_PIN_x (x from 0 to 6). The two output pins of the IR&nbsp;sensors &nbsp;(D9 and D10)&nbsp;has been defined as&nbsp;IR1 and IR2.<\/p>\n<pre class=\"lang:c decode:true\">\/*===========================================================================*\/\n\/* PIN-map.                                                                  *\/\n\/*===========================================================================*\/\n#define DISP_PIN_0              2        \/* digital pin input for segment A  *\/\n#define DISP_PIN_1              3        \/* digital pin input for segment B  *\/\n#define DISP_PIN_2              4        \/* digital pin input for segment C  *\/\n#define DISP_PIN_3              5        \/* digital pin input for segment D  *\/\n#define DISP_PIN_4              6        \/* digital pin input for segment E  *\/\n#define DISP_PIN_5              7        \/* digital pin input for segment F  *\/\n#define DISP_PIN_6              8        \/* digital pin input for segment G  *\/\n#define IR1                     9        \/* digital pin input for ir sensor  *\/\n#define IR2                     10       \/* digital pin input for ir sensor  *\/<\/pre>\n<p>We have also defined some additional constants:<\/p>\n<ul>\n<li>NUMB_OF_PRESET, that is number of pre-set stored in our look up table&nbsp;(i.e. 10 since we are going to use digits from 0 to 9);<\/li>\n<li>NUMB_OF_SEGMENTS, that is the display segments we are using;<\/li>\n<li>MAX_NUMB, that is the high counting range limit.<\/li>\n<\/ul>\n<pre class=\"lang:c decode:true\">\/*===========================================================================*\/\n\/* Constant values                                                           *\/\n\/*===========================================================================*\/\n#define NUMB_OF_PRESET          10       \/* Available preset                 *\/\n#define NUMB_OF_SEGMENTS         7       \/* Available segments               *\/\n\n#define MAX_NUMB                 9       \/* High counting range limit        *\/\n<\/pre>\n<p>There are some other constant value declared in our code, anyway for&nbsp;ease of use we preferred to store them into an bidimensional array&nbsp;called displaySEG is a look up table: in other words it is an collection&nbsp;of PIN preset required to show a certain digit on&nbsp;the display.<\/p>\n<p>While the rows indicate the digit, the columns represent each segment (LED) of the display. For example, to display the number 0, all the&nbsp;segment except G&nbsp;must be set as HIGH (see Fig.2). The first element of our array stores the configuration required by each DISP_PIN to display a 0. So we&nbsp;can use the array displaySEG[0] in a loop&nbsp;to set each DISP_PIN according to our preset and obtain our 0.<\/p>\n<pre class=\"lang:c decode:true \">\/*===========================================================================*\/\n\/* Lookup table.                                                             *\/\n\/*===========================================================================*\/\nconst byte displaySEG[NUMB_OF_PRESET][NUMB_OF_SEGMENTS] = {\n        \/*  A     B     C     D     E     F     G            *\/\n        { HIGH, HIGH, HIGH, HIGH, HIGH, HIGH,  LOW }, \/*  0  *\/\n        {  LOW, HIGH, HIGH,  LOW,  LOW,  LOW,  LOW }, \/*  1  *\/\n        { HIGH, HIGH,  LOW, HIGH, HIGH,  LOW, HIGH }, \/*  2  *\/\n        { HIGH, HIGH, HIGH, HIGH,  LOW,  LOW, HIGH }, \/*  3  *\/\n        {  LOW, HIGH, HIGH,  LOW,  LOW, HIGH, HIGH }, \/*  4  *\/\n        { HIGH,  LOW, HIGH, HIGH,  LOW, HIGH, HIGH }, \/*  5  *\/\n        { HIGH,  LOW, HIGH, HIGH, HIGH, HIGH, HIGH }, \/*  6  *\/\n        { HIGH, HIGH, HIGH,  LOW,  LOW,  LOW,  LOW }, \/*  7  *\/\n        { HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH }, \/*  8  *\/\n        { HIGH, HIGH, HIGH, HIGH,  LOW, HIGH, HIGH }, \/*  9  *\/\n};\n<\/pre>\n<p>We need for additional variables which are&nbsp;the status of the IR sensors named as&nbsp;IRx_out (with x 1 or&nbsp;2), a variable to store&nbsp;the counting value and a generic i used in loops.<\/p>\n<pre class=\"\">int IR1_out = HIGH; \/* Avoiding initial false detections.    *\/\nint IR2_out = HIGH; \/* Avoiding initial false detections.    *\/\nint counter = 0;\nint i = 0;<\/pre>\n<h4 id=\"8_Functions_explained\" class=\"level_2\">Functions explained<\/h4>\n<h5 id=\"9_setDisplayValue_\" class=\"level_3\">setDisplayValue()<\/h5>\n<p>This&nbsp;function writes a number from 0 to 9 on the display. More in details, the parameter n represent the number to show on our display. Note that&nbsp;n%10 is required to avoid eventual buffer overflow.<\/p>\n<pre class=\"lang:c decode:true\">void setDisplayValue(int n) {\n  for(i = 0; i &lt; NUMB_OF_SEGMENTS; i++){\n    digitalWrite(DISP_PIN_0 + i, displaySEG[n % 10][i]);\n  }\n}<\/pre>\n<h5 id=\"10_initDisplay_\" class=\"level_3\">initDisplay()<\/h5>\n<p>This is not a function but a macro which ridefine&nbsp;setDisplayValue passing 0 as argument. This macro&nbsp;is used to reset display on start-up. Note that using the preprocessor directives we are still optimizing memories and performances avoiding to create an additional <a href=\"http:\/\/stackoverflow.com\/questions\/1266233\/what-is-activation-record-in-the-context-of-c-and-c\">activation record<\/a>.<\/p>\n<pre class=\"lang:c decode:true \">#define initDisplay() setDisplayValue(0)<\/pre>\n<h5 id=\"11_increaseAndDisplay_\" class=\"level_3\">increaseAndDisplay()<\/h5>\n<p>This&nbsp;function increases the counter and updates the display. Note that,&nbsp;if the counter becomes greater than MAX_NUMB it wraps to 1.<\/p>\n<pre class=\"lang:c decode:true\">void increaseAndDisplay() {\n  counter++;\n  if(counter &gt; MAX_NUMB) {\n    counter = 1;\n  }\n  setDisplayValue(counter);\n}<\/pre>\n<h5 id=\"12_decreaseAndDisplay_\" class=\"level_3\">decreaseAndDisplay()<\/h5>\n<p>This&nbsp;function decreases the counter and updates the display.&nbsp;Note that, if the counter is equal to 0 it does nothing: in this way we are avoiding negative numbers.<\/p>\n<pre class=\"lang:c decode:true\">void decreaseAndDisplay() {\n  if(counter) {\n    counter--;\n    setDisplayValue(counter);\n  }\n}<\/pre>\n<h4 id=\"13_Main_code\" class=\"level_2\">Main code<\/h4>\n<h5 id=\"14_setup_\" class=\"level_3\">setup()<\/h5>\n<p>The setup() sets pin modes: IRx as inputs &nbsp;and DISP_PIN_x&nbsp;as output. Than it call initDisplay() showing a zero on our <b>SMA42056<\/b>.<\/p>\n<pre class=\"lang:c decode:true\">void setup() {\n  Serial.begin (9600);\n  pinMode(IR1, INPUT);\n  pinMode(IR2, INPUT);\n  \/* Setting Display related PIN as OUTPUT *\/\n  for(i = 0; i &lt; NUMB_OF_SEGMENTS; i++){\n    pinMode(DISP_PIN_0 + i, OUTPUT);\n  } \n  initDisplay();\n}<\/pre>\n<h5 id=\"15_loop_\" class=\"level_3\">loop()<\/h5>\n<p>The loop reads&nbsp;IR statuses saving&nbsp;in them into IRx_out.&nbsp;When an non-transparent object is detected by an IR its value is LOW. If the &ldquo;entrance&rdquo; IR detects an object loop calls&nbsp;increaseAndDisplay(), if the other IR detects an object the loops calls&nbsp;decreaseAndDisplay(). Note that a delay is required to avoid false detections.<\/p>\n<pre class=\"lang:c decode:true \">void loop() {\n  IR1_out = digitalRead(IR1);\n  IR2_out = digitalRead(IR2);\n  if(IR1_out == LOW) {\n    increaseAndDisplay();\n    delay(500);\n  }\n  if(IR2_out == LOW) {\n    decreaseAndDisplay();\n    delay(500);\n  } \n  delay(100);\n}\n<\/pre>\n<h3 id=\"16_Download_for_Arduino_IDE\" class=\"level_1\">Download for Arduino IDE<\/h3>\n<p>This demo has been tested under Arduino IDE 1.6.7:<\/p>\n<p><a href=\"https:\/\/playembedded.org\/wp-content\/uploads\/2016\/05\/DEMO01_IRCounter.7z\">DEMO01_IRCounter<\/a><\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>About In this article we will resume the topic started with in &ldquo;Detecting obstacle with IR Sensor and Arduino&rdquo;. More in details, we are going to use the IR sensor like an objects counter. The counter application is often used for: counting people traversing a certain passage or entrance. For example, in commercial buildings there [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":2385,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1018],"tags":[],"coauthors":[252],"class_list":["post-2127","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino"],"views":98027,"jetpack_featured_media_url":"https:\/\/playembedded.org\/blog\/wp-content\/uploads\/2016\/04\/An-object-counter-using-an-IR-sensor-and-Arduino.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/posts\/2127","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/comments?post=2127"}],"version-history":[{"count":0,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/posts\/2127\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/media\/2385"}],"wp:attachment":[{"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/media?parent=2127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/categories?post=2127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/tags?post=2127"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/playembedded.org\/blog\/wp-json\/wp\/v2\/coauthors?post=2127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}