{"id":1317,"date":"2022-11-06T04:31:14","date_gmt":"2022-11-06T04:31:14","guid":{"rendered":"https:\/\/blog.embeddedexpert.io\/?p=1317"},"modified":"2022-11-06T04:31:17","modified_gmt":"2022-11-06T04:31:17","slug":"working-with-stm32-and-acceleration-sensor-adxl345-in-spi-mode-part-2","status":"publish","type":"post","link":"https:\/\/blog.embeddedexpert.io\/?p=1317","title":{"rendered":"Working with STM32 and Acceleration Sensor: ADXL345 in SPI mode Part 2"},"content":{"rendered":"\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"333\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/11\/41RNUutQb0L.jpg\" alt=\"\" class=\"wp-image-1318\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/11\/41RNUutQb0L.jpg 500w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/11\/41RNUutQb0L-300x200.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/11\/41RNUutQb0L-400x266.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/11\/41RNUutQb0L-250x167.jpg 250w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/figure><\/div>\n\n\n\n<p>In part 1 (<a rel=\"noreferrer noopener\" href=\"https:\/\/blog.embeddedexpert.io\/?p=1310\" data-type=\"URL\" data-id=\"https:\/\/blog.embeddedexpert.io\/?p=1310\" target=\"_blank\">here<\/a>), we saw to configure the SPI and other parameters required for ADXL345 operation in SPI mode. We shall continue from here:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">8. adx345 read\/write functions:<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>In order for the adxl345 to distinguish between SPI and I2C, when sending the address, a bit shall be set called multibyte as shown here:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"680\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/11\/2022-11-06_06-48-16-1024x680.png\" alt=\"\" class=\"wp-image-1319\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/11\/2022-11-06_06-48-16-1024x680.png 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/11\/2022-11-06_06-48-16-300x199.png 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/11\/2022-11-06_06-48-16-768x510.png 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/11\/2022-11-06_06-48-16-1536x1021.png 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/11\/2022-11-06_06-48-16-2048x1361.png 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/11\/2022-11-06_06-48-16-1150x764.png 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/11\/2022-11-06_06-48-16-750x498.png 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/11\/2022-11-06_06-48-16-400x266.png 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/11\/2022-11-06_06-48-16-250x166.png 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Hence, we shall create two symbolic names for read operation and multibyte as following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">#define   MULTI_BYTE_EN\t\t\t0x40\n#define\t  READ_OPERATION\t\t0x80<\/pre><\/div>\n\n\n\n<p>Hence, the adxl345 read function as following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">static void adxl345_read(uint8_t address, uint8_t * rxdata)\n{\n\t\n\t\/*Set read operation*\/\n\taddress |= READ_OPERATION;\n\n\t\/*Enable multi-byte*\/\n\taddress |= MULTI_BYTE_EN;\n\n\t\/*Pull cs line low to enable slave*\/\n\tcs_enable();\n\n\t\/*Send address*\/\n\tspi1_transmit(&amp;address,1);\n\n\t\/*Read 6 bytes *\/\n\tspi1_receive(rxdata,6);\n\n\t\/*Pull cs line high to disable slave*\/\n\tcs_disable();\n\n}\n<\/pre><\/div>\n\n\n\n<p>adxl345 write function:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">\nstatic void adxl345_write(uint8_t address, uint8_t value)\n{\n\tuint8_t data[2];\n\n\t\/*Enable multi-byte, place address into buffer*\/\n\tdata[0] = address|MULTI_BYTE_EN;\n\n\t\/*Place data into buffer*\/\n\tdata[1] = value;\n\n\t\/*Pull cs line low to enable slave*\/\n\tcs_enable();\n\n\t\/*Transmit data and address*\/\n\tspi1_transmit(data, 2);\n\n\t\/*Pull cs line high to disable slave*\/\n\tcs_disable();\n\n\n}<\/pre><\/div>\n\n\n\n<p>The initialization is similar to the i2c guide:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">\nvoid adxl345_init(adxl345Parameters param)\n\t{\n\t\tacc_range=param;\n\t\tadxl_spi_pins_init();\n\t\tadxl_spi_config();\n\t\t\/*Set data format range to +-4g*\/\n\t\tadxl345_write (DATA_FORMAT_R, param);\n\n\t\t\/*Reset all bits*\/\n\t\tadxl345_write (POWER_CTL_R, RESET);\n\n\t\t\/*Configure power control measure bit*\/\n\t\tadxl345_write (POWER_CTL_R, SET_MEASURE_B);\n\n\t}\n\n<\/pre><\/div>\n\n\n\n<p>For the update adxl345 function:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">\nvoid adxl345_update()\n\t{\n\n\n\n\t\tadxl345_read(DATA_START_ADDR,data_rec);\n\n\t\tx = ((data_rec[1]&lt;&lt;8)|data_rec[0]);\n\t\ty = ((data_rec[3]&lt;&lt;8)|data_rec[2]);\n\t\tz = ((data_rec[5]&lt;&lt;8)|data_rec[4]);\n\n\t}\n<\/pre><\/div>\n\n\n\n<p>For getting the values:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">void adxl345_get_values(accleration_values_t * values)\n\t{\n\tfloat divider;\n\tswitch(acc_range)\n\t{\n\t\tcase accl_2g: divider=0.003906; \/*1\/256*\/\tbreak;\n\t\tcase accl_4g: divider=0.0078125;\/*1\/128*\/\tbreak;\n\t\tcase accl_8g: divider=0.01563;\t\/*1\/64*\/\tbreak;\n\t\tcase accl_16g: divider=0.03125;\t\/*1\/32*\/\tbreak;\n\t}\n\n\t\tvalues-&gt;ax=x*divider;\n\t\tvalues-&gt;ay=y*divider;\n\t\tvalues-&gt;az=z*divider;\n\t}\n<\/pre><\/div>\n\n\n\n<p>Hence, the entire adxl345.c source file:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">\n#include &quot;adxl345.h&quot;\n#include &quot;spi.h&quot;\n\n\n#define DATA_FORMAT_R   \t\t(0x31) \/*data format register*\/\n#define POWER_CTL_R \t\t\t(0x2D) \/*Power control register*\/\n#define DATA_START_ADDR\t\t\t(0x32) \/*Start address to read the values*\/\n\n#define\tRESET\t\t\t\t\t(0x00) \/*Reset value*\/\n#define SET_MEASURE_B\t\t    (0x08) \/*Put adxl345 into measurement mode*\/\n\n\/*Variables which hold some variable*\/\nuint8_t data_rec[6];\nuint8_t acc_range;\nint16_t x,y,z;\n\n\n#define   MULTI_BYTE_EN\t\t\t0x40\n#define\t  READ_OPERATION\t\t0x80\n\n\n\nstatic void adxl345_write(uint8_t address, uint8_t value)\n{\n\tuint8_t data[2];\n\n\t\/*Enable multi-byte, place address into buffer*\/\n\tdata[0] = address|MULTI_BYTE_EN;\n\n\t\/*Place data into buffer*\/\n\tdata[1] = value;\n\n\t\/*Pull cs line low to enable slave*\/\n\tcs_enable();\n\n\t\/*Transmit data and address*\/\n\tspi1_transmit(data, 2);\n\n\t\/*Pull cs line high to disable slave*\/\n\tcs_disable();\n\n\n}\n\nstatic void adxl345_read(uint8_t address, uint8_t * rxdata)\n{\n\n\t\/*Set read operation*\/\n\taddress |= READ_OPERATION;\n\n\t\/*Enable multi-byte*\/\n\taddress |= MULTI_BYTE_EN;\n\n\t\/*Pull cs line low to enable slave*\/\n\tcs_enable();\n\n\t\/*Send address*\/\n\tspi1_transmit(&amp;address,1);\n\n\t\/*Read 6 bytes *\/\n\tspi1_receive(rxdata,6);\n\n\t\/*Pull cs line high to disable slave*\/\n\tcs_disable();\n\n}\n\nvoid adxl345_init(adxl345Parameters param)\n\t{\n\t\tacc_range=param;\n\t\tadxl_spi_pins_init();\n\t\tadxl_spi_config();\n\t\t\/*Set data format range to +-4g*\/\n\t\tadxl345_write (DATA_FORMAT_R, param);\n\n\t\t\/*Reset all bits*\/\n\t\tadxl345_write (POWER_CTL_R, RESET);\n\n\t\t\/*Configure power control measure bit*\/\n\t\tadxl345_write (POWER_CTL_R, SET_MEASURE_B);\n\n\t}\n\n\nvoid adxl345_update()\n\t{\n\n\n\n\t\tadxl345_read(DATA_START_ADDR,data_rec);\n\n\t\tx = ((data_rec[1]&lt;&lt;8)|data_rec[0]);\n\t\ty = ((data_rec[3]&lt;&lt;8)|data_rec[2]);\n\t\tz = ((data_rec[5]&lt;&lt;8)|data_rec[4]);\n\n\t}\n\nvoid adxl345_get_values(accleration_values_t * values)\n\t{\n\tfloat divider;\n\tswitch(acc_range)\n\t{\n\t\tcase accl_2g: divider=0.003906; \/*1\/256*\/\tbreak;\n\t\tcase accl_4g: divider=0.0078125;\/*1\/128*\/\tbreak;\n\t\tcase accl_8g: divider=0.01563;\t\/*1\/64*\/\tbreak;\n\t\tcase accl_16g: divider=0.03125;\t\/*1\/32*\/\tbreak;\n\t}\n\n\t\tvalues-&gt;ax=x*divider;\n\t\tvalues-&gt;ay=y*divider;\n\t\tvalues-&gt;az=z*divider;\n\t}\n<\/pre><\/div>\n\n\n\n<p>adxl345.h header file:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">#ifndef ADXL345_H_\n#define ADXL345_H_\n\n#include &quot;stdint.h&quot;\n\ntypedef enum\n{\n\taccl_2g=0,\n\taccl_4g=1,\n\taccl_8g=2,\n\taccl_16g=3\n}adxl345Parameters;\n\ntypedef struct\n{\n\n\tfloat ax;\n\tfloat ay;\n\tfloat az;\n\n}accleration_values_t;\n\nvoid adxl345_init(adxl345Parameters param);\nvoid adxl345_update();\nvoid adxl345_get_values(accleration_values_t * values);\n\n\n\n\n\n\n#endif \/* ADXL345_H_ *\/\n<\/pre><\/div>\n\n\n\n<p>Within main.c:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">#include &quot;delay.h&quot;\n#include &quot;adxl345.h&quot;\n#include &quot;stdio.h&quot;\naccleration_values_t accleration_values;\nextern void uart2_rxtx_init(void);\nint main(void)\n{\n\tuart2_rxtx_init();\n\tadxl345_init(accl_4g);\n\twhile(1)\n\t\t{\n\t\t\tadxl345_update();\n\t\t\tadxl345_get_values(&amp;accleration_values);\n\t\t\tprintf(&quot;ax=%0.5f\\tay=%0.5f\\taz=%0.5f\\r\\n&quot;,accleration_values.ax,accleration_values.ay,accleration_values.az);\n\t\t\tdelay(20);\n\n\t\t}\n\n}\n<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">9. Code:<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>You may download the entire code from here:<\/p>\n\n\n\n<div class=\"wp-block-file\"><a href=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/11\/ADXL345_SPI.zip\">ADXL345_SPI<\/a><a href=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/11\/ADXL345_SPI.zip\" class=\"wp-block-file__button\" download>Download<\/a><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">10. Results:<\/h2>\n\n\n\n<p>Open your serial terminal application and set the baudrate to 115200 and you should get the following:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"710\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-26-at-8.31.58-AM-1024x710.png\" alt=\"\" class=\"wp-image-1308\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-26-at-8.31.58-AM-1024x710.png 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-26-at-8.31.58-AM-300x208.png 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-26-at-8.31.58-AM-768x533.png 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-26-at-8.31.58-AM-1150x798.png 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-26-at-8.31.58-AM-750x520.png 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-26-at-8.31.58-AM-400x277.png 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-26-at-8.31.58-AM-250x173.png 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/10\/Screenshot-2022-10-26-at-8.31.58-AM.png 1168w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In part 1 (here), we saw to configure the SPI and other parameters required for ADXL345 operation in SPI mode. We shall continue from here: 8. adx345 read\/write functions: In order for the adxl345 to distinguish between SPI and I2C, when sending the address, a bit shall be set called multibyte as shown here: Hence, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1317","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/1317"}],"collection":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1317"}],"version-history":[{"count":1,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/1317\/revisions"}],"predecessor-version":[{"id":1321,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/1317\/revisions\/1321"}],"wp:attachment":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1317"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1317"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1317"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}