{"id":2311,"date":"2024-07-16T15:47:37","date_gmt":"2024-07-16T15:47:37","guid":{"rendered":"https:\/\/iotthinghub.com\/?p=2311"},"modified":"2024-08-12T12:44:12","modified_gmt":"2024-08-12T12:44:12","slug":"uart","status":"publish","type":"post","link":"https:\/\/iotthinghub.com\/?p=2311","title":{"rendered":"UART"},"content":{"rendered":"\n<p class=\"has-text-color has-link-color wp-elements-779ba18b5ca1c34fde97fa0b2a43124c wp-block-paragraph\" style=\"color:#5c5c5c\">USART stands for Universal Synchronous Asynchronous Transmitter and Receiver in which a packet of data enclosed in an envelope of start and stop bit. Synchronous means that single clock source would be shared by end devices to facilitate communication and asynchronous means, there would be no synchronous clock source would be the end of the device. To allow the communication between two devices we need to decide a bound rate. Here bound rate is the speed of your communication and is measured in bits per second. Let\u2019s look at the USART register available in AVR and there uses-<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img fetchpriority=\"high\" decoding=\"async\" width=\"590\" height=\"975\" src=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/usart.png\" alt=\"\" class=\"wp-image-2314\" style=\"width:618px;height:auto\" srcset=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/usart.png 590w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/usart-182x300.png 182w\" sizes=\"(max-width: 590px) 100vw, 590px\" \/><\/figure>\n\n\n\n<p class=\"has-text-color has-link-color has-upper-heading-font-size wp-elements-658e75d8f8182f159caaa84a6af1f309 wp-block-paragraph\" style=\"color:#6c8a97\">Initialize USART<\/p>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-392dc659fc2995d0d9b5faba7f6218b6 wp-block-paragraph\" style=\"color:#5c5c5c\">Initialize USART is very simple. Just initialize the following condition<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" width=\"1024\" height=\"120\" src=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/function-5-1024x120.jpg\" alt=\"\" class=\"wp-image-2317\" style=\"width:546px;height:auto\" srcset=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/function-5-1024x120.jpg 1024w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/function-5-300x35.jpg 300w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/function-5-768x90.jpg 768w, https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/07\/function-5.jpg 1167w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-d92099ae1a5c401d2882877fd1277960 wp-block-paragraph\" style=\"color:#5c5c5c\">Thus for BAUD RATE=9600 with F_CPU=8MHz, the UBRR value is 51. If U2X bit is enabled then simply multiply 2 with UBRR value.<\/p>\n\n\n\n<ol style=\"color:#5c5c5c\" class=\"wp-block-list has-text-color has-link-color has-upper-heading-font-size wp-elements-903df22c226d1a08f6a2cf73c6881d7b\">\n<li>Enable Transmit or Receive mode with either Synchronous or Asynchronous operation&nbsp;<\/li>\n\n\n\n<li class=\"has-upper-heading-font-size\">Select the character frame size with parity and stop bit.<\/li>\n<\/ol>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-b69da8f19572f19b997e49bc2d9bf8c9 wp-block-paragraph\" style=\"color:#5c5c5c\">Let\u2019s enable USART mode with BAUD RATE=9600, F_CPU=8MHz, Asynchronous mode, 8 bit character with no parity and 1 stop bit. From the above calculation UBRR=51.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: cpp; auto-links: false; title: ; quick-code: false; notranslate\" title=\"\">\nvoid usart_init(void)\n{\n  UBRR0=(uint8_t)51; \/\/UBRR0H=0;\n  \/******  Asynchronous mode, 8 bit character with no parity and 1 stop bit *******\/\n  UCSRB|=(1&lt;&lt;RXEN)|(1&lt;&lt;TXEN);\n  UCSRC|=(1&lt;&lt;URSEL)|(1&lt;&lt;UCSZ1)|(1&lt;&lt;UCSZ0); \/\/For UCSRC register selection URSEL bit is set.\n}\n<\/pre><\/div>\n\n\n<p class=\"has-text-color has-link-color has-upper-heading-font-size wp-elements-1b5574eb0ce9b98850cbe2f0d71cd9b2 wp-block-paragraph\" style=\"color:#6c8a97\">Send individual indications<\/p>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-1ffcb83deaa897110720976a7452b547 wp-block-paragraph\" style=\"color:#5c5c5c\">Since the UDR register is full duplex, data can be transmitted by writing this register and data can be received by reading this register. To send data just write the data to UDR and it automatically send via AVR Tx pin. Now wait until the transmission complete either checking the TXC or UDRE bit in UCSRA register. Since the flag register is set when data send completed. So the checking condition is<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: cpp; auto-links: false; title: ; quick-code: false; notranslate\" title=\"\">\nUDR=ByteToSend;\nwhile(!(UCSRA&amp;(1&lt;&lt;TXC)))\n{\n;\/\/ wait until data send\n}\n\n<\/pre><\/div><\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">OR<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: cpp; auto-links: false; title: ; quick-code: false; notranslate\" title=\"\">\nUDR=ByteToSend;\nwhile(!(UCSRA&amp;(1&lt;&lt;UDRE)))\n{\n;\/\/ wait for possible sending\n}\n\n<\/pre><\/div><\/div>\n<\/div>\n\n\n\n<ul style=\"color:#5c5c5c\" class=\"wp-block-list has-text-color has-link-color wp-elements-f7652c76f6a1054a1ff89102cbba9827\">\n<li class=\"has-medium-font-size\"><strong>Send character<\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-8e720632309390dd5ee40b06dd4503f2 wp-block-paragraph\" style=\"color:#5c5c5c\">Function call:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; usart_putc(\u2018c\u2019);<\/p>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-98ee62728499feb216c647ceaa29f46e wp-block-paragraph\" style=\"color:#5c5c5c\">Function definition:&nbsp;&nbsp;&nbsp;&nbsp; <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: cpp; auto-links: false; title: ; quick-code: false; notranslate\" title=\"\">\nvoid usart_putc(unsigned char c)\n{\n  while(!(UCSRA&amp;(1&lt;&lt;UDRE)));\n  UDR=c;\n  while(!(UCSRA&amp;(1&lt;&lt;UDRE)));\n}\n<\/pre><\/div>\n\n\n<ul style=\"color:#5c5c5c\" class=\"wp-block-list has-text-color has-link-color wp-elements-0fffa813a0d1f44c6defe7db1beae7de\">\n<li class=\"has-medium-font-size\">Send string<\/li>\n<\/ul>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-f80f0f596bd7e9b1cca127f17d709269 wp-block-paragraph\" style=\"color:#5c5c5c\">Function call:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; usart_puts(\u201cSend string\u201d);<\/p>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-634e7e00847903f48006317d8e22a8f0 wp-block-paragraph\" style=\"color:#5c5c5c\">Function definition:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: cpp; auto-links: false; title: ; quick-code: false; notranslate\" title=\"\">\nvoid usart_puts( char *star)\n{\n  while(*star)\n   {\n     usart_putc(*star);\n     star++;\n   }\n}\n<\/pre><\/div>\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<ul style=\"color:#5c5c5c\" class=\"wp-block-list has-text-color has-link-color has-medium-font-size wp-elements-1215b0ea7f2d5f9110c7150a20bb4e04\">\n<li class=\"has-medium-font-size\">Send signed 16 bit integer(int16_t)<\/li>\n<\/ul>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-dad06c159ddde173216d56a31b089abf wp-block-paragraph\" style=\"color:#5c5c5c\">Function call:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; usart_puti16(-123);<\/p>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-634e7e00847903f48006317d8e22a8f0 wp-block-paragraph\" style=\"color:#5c5c5c\">Function definition:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: cpp; auto-links: false; title: ; quick-code: false; notranslate\" title=\"\">\nvoid usart_puti16(int16_t a)\n{\n  char s&#x5B;20];\n  itoa(a,s,10);\n  usart_puts(s);\n}\n<\/pre><\/div><\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<ul style=\"color:#5c5c5c\" class=\"wp-block-list has-text-color has-link-color has-medium-font-size wp-elements-92e7e2dd50e2e8b3a1e7e74f38446016\">\n<li class=\"has-medium-font-size\">Send signed 16 bit integer(uint16_t)<\/li>\n<\/ul>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-852ea1ddd9f2f00ab3eb6a3315ca4717 wp-block-paragraph\" style=\"color:#5c5c5c\">Function call:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; usart_puti16(123);<\/p>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-634e7e00847903f48006317d8e22a8f0 wp-block-paragraph\" style=\"color:#5c5c5c\">Function definition:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: cpp; auto-links: false; title: ; quick-code: false; notranslate\" title=\"\">\nvoid usart_putui16(uint16_t a)\n{\n  char s&#x5B;20];\n  utoa(a,s,10);\n  usart_puts(s);\n}\n<\/pre><\/div><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<ul style=\"color:#5c5c5c\" class=\"wp-block-list has-text-color has-link-color wp-elements-6b8605241f9da79fe6143db69b2e5b34\">\n<li class=\"has-medium-font-size\">Send signed 32 bit integer(int32_t)<\/li>\n<\/ul>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-85ddaa5371ea79d5322551b28125d02c wp-block-paragraph\" style=\"color:#5c5c5c\">Function call:&nbsp;&nbsp;&nbsp;&nbsp; usart_puti32(-12345); <\/p>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-634e7e00847903f48006317d8e22a8f0 wp-block-paragraph\" style=\"color:#5c5c5c\">Function definition:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: cpp; auto-links: false; title: ; quick-code: false; notranslate\" title=\"\">\nvoid usart_puti32(int32_t a)\n{\n char s&#x5B;20];\n ltoa(a,s,10);\n usart_puts(s);\n}\n<\/pre><\/div><\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<ul style=\"color:#5c5c5c\" class=\"wp-block-list has-text-color has-link-color wp-elements-1d390017cd51f2a3ce37a856db6b31cf\">\n<li class=\"has-medium-font-size\">Send signed 32 bit integer(uint32_t)<\/li>\n<\/ul>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-f27630d608f829bc9ba787bcd28bdb98 wp-block-paragraph\" style=\"color:#5c5c5c\">Function call:&nbsp;&nbsp;&nbsp;&nbsp; usart_putui32(12345);<\/p>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-634e7e00847903f48006317d8e22a8f0 wp-block-paragraph\" style=\"color:#5c5c5c\">Function definition:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: cpp; auto-links: false; title: ; quick-code: false; notranslate\" title=\"\">\nvoid usart_putui32(uint32_t a)\n{\n  char s&#x5B;20];\n  ultoa(a,s,10);\n  usart_puts(s);\n}\n<\/pre><\/div><\/div>\n<\/div>\n\n\n\n<ul style=\"color:#5c5c5c\" class=\"wp-block-list has-text-color has-link-color wp-elements-1aa31ac84525f67fa60f04a168fc46f3\">\n<li>Send float<\/li>\n<\/ul>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-790e6509504c5f94e2bc995cefa1bdfc wp-block-paragraph\" style=\"color:#5c5c5c\">Function call:&nbsp;&nbsp;&nbsp;&nbsp; usart_putf(3.23);<\/p>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-634e7e00847903f48006317d8e22a8f0 wp-block-paragraph\" style=\"color:#5c5c5c\">Function definition:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: cpp; auto-links: false; title: ; quick-code: false; notranslate\" title=\"\">\nvoid usart_putf(float f)\n{\n  char s&#x5B;20];\n  dtostrf(f,19,3,s); \/\/19 is the string limit &amp; 3 is after period(.)\n  usart_puts(s);\n}\n<\/pre><\/div>\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-3e41869c wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/08\/USART-note.rar\" style=\"padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--40)\">download<\/a><\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<p class=\"has-text-color has-link-color has-upper-heading-font-size wp-elements-25d0fce8280d14a7df33dd8a65fe974e wp-block-paragraph\" style=\"color:#6c8a97\"><a href=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/08\/USART-note.rar\">Download the full usart header file+ C conversion with code<\/a><\/p>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-83e0a0ca2fe2f955f5ad15d1cb072ed7 wp-block-paragraph\" style=\"color:#5c5c5c\">The conversion is more complicated to memorize. In that case you can use sprintf(string,\u201dConvertion\u201d,variables) function which is available in #include&lt;stdio.h&gt;<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: cpp; auto-links: false; title: ; quick-code: false; notranslate\" title=\"\">\n  #include&lt;stdio.h&gt;\n  char usart&#x5B;20];\n  \/****convert whatever data type you want to string******\/\n  sprintf(usart,\u201d%x\u201d,your_data); \n  usart_puts(usart);\n\n<\/pre><\/div>\n\n\n<p class=\"has-text-color has-link-color has-upper-heading-font-size wp-elements-c2c5371e56303ba65e8437eea01d62c6 wp-block-paragraph\" style=\"color:#6c8a97\">Receiving Indication<\/p>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-1dcedc4d247a7abf43618bd1cf490258 wp-block-paragraph\" style=\"color:#5c5c5c\">Since UDR register is full duplex, we can receive data through UDR register. In this case we first check if any data available. This can be done with the help of RXC flag register.<\/p>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-45119742ba04c56ee8f78221ff399a78 wp-block-paragraph\" style=\"color:#5c5c5c\">Function call:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; char c=usart_getc();<\/p>\n\n\n\n<p class=\"has-text-color has-link-color wp-elements-634e7e00847903f48006317d8e22a8f0 wp-block-paragraph\" style=\"color:#5c5c5c\">Function definition:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: cpp; auto-links: false; title: ; quick-code: false; notranslate\" title=\"\">\nchar usart_getc(void)\n {\n  while(!(UCSRA&amp;(1&lt;&lt;RXC)))\n   {\n     ; \/\/wait until receive complete  \n   }\n  return UDR;\n }\n<\/pre><\/div>\n\n\n<p class=\"has-text-color has-link-color wp-elements-a8a3d3161f1d421b6bac819a987bc739 wp-block-paragraph\" style=\"color:#5c5c5c\">Let\u2019s make a program to display ADC value of AVR to PC with the help of USART feature. In this program ADC value will be display if enter pressed. In this section we just show the result in Proteus VIRTUAL TERMINAL with parameter Baud Rate : 9600, Data Bits : 8, Parity : NONE &amp; Stops Bits : 1 . The program is very simple, look at the coding and it will be easier to understand. <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: cpp; auto-links: false; title: ; quick-code: false; notranslate\" title=\"\">\n  #include&lt;avr\/io.h&gt;\n  #include&lt;util\/delay.h&gt;\n  #include&lt;stdio.h&gt;\n  #include&quot;usart.h&quot;\n  #include&quot;adc.h&quot;\nint main(void)\n  {\n   usart_init();\n   adc_init();\n   usart_puts(&quot;********************************************\\r&quot;);\n   usart_puts(&quot;*********   shani kumar sarkar   ***********\\r&quot;);\n   usart_puts(&quot;*********   Read ADC value       ***********\\r&quot;);\n   usart_puts(&quot;********************************************\\r&quot;);\n   usart_puts(&quot;\\r press enter to get ADC value\\r&quot;);\n  while(1)\n    {\n     if(usart_getc()==&#039;\\r&#039;)\n\t   {\n\t\tusart_puti16(read_adc(0));\n\t\tusart_putc(&#039;\\r&#039;);\n\t   }\n    }\n return 0;\n}\n<\/pre><\/div>\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-7387b849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\">\n<div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-3e41869c wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/08\/Display-ADC.rar\" style=\"padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--40)\">download<\/a><\/div>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<p class=\"has-text-color has-link-color has-upper-heading-font-size wp-elements-7ae8ce70e0ec028a86817c62c1a65fb2 wp-block-paragraph\" style=\"color:#252525\"><a href=\"https:\/\/iotthinghub.com\/wp-content\/uploads\/2024\/08\/Display-ADC.rar\">Display ADC.rar<\/a><\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>USART stands for Universal Synchronous Asynchronous Transmitter and Receiver in which a packet of data enclosed in an envelope of start and stop bit. Synchronous means that single clock source would be shared by end devices to facilitate communication and asynchronous means, there would be no synchronous clock source would be the end of the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"class_list":["post-2311","post","type-post","status-publish","format-standard","hentry","category-uart"],"_links":{"self":[{"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/posts\/2311","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2311"}],"version-history":[{"count":20,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/posts\/2311\/revisions"}],"predecessor-version":[{"id":2655,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=\/wp\/v2\/posts\/2311\/revisions\/2655"}],"wp:attachment":[{"href":"https:\/\/iotthinghub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iotthinghub.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}