{"id":823,"date":"2022-03-14T16:30:32","date_gmt":"2022-03-14T16:30:32","guid":{"rendered":"https:\/\/blog.embeddedexpert.io\/?p=823"},"modified":"2022-03-14T16:30:36","modified_gmt":"2022-03-14T16:30:36","slug":"working-with-stm32-and-sensors-bmp180-pressure-and-temperature-sensor","status":"publish","type":"post","link":"https:\/\/blog.embeddedexpert.io\/?p=823","title":{"rendered":"Working with STM32 and Sensors: BMP180 pressure and temperature sensor"},"content":{"rendered":"\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/m.media-amazon.com\/images\/I\/41LrBcBndTL._AC_SY780_.jpg\" alt=\"\" \/><\/figure><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>In this guide, we shall use STM32 to acquire data from BMP180 temperature and pressure sensor and display the results on OLED display.<\/p>\n\n\n\n<p>In this guide, we shall cover the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>BMP180 Sensor.<\/li><li>Connection with STM32.<\/li><li>Code.<\/li><li>Results.<\/li><\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1.1  BMP180 sensor:<\/h2>\n\n\n\n<p><strong>What is Atmospheric Pressure and BMP 180 Atmospheric Pressure Sensor?&nbsp;<\/strong>BMP 180 atmospheric pressure sensor is a such type of sensor which is mainly used for measuring atmospheric pressure or biometric pressure. If we talk about pressure, then pressure is a force that effect on per unit area .The unit, which is commonly used for pressure is pound per square inch means when one pound force presses one square inch area then this pressure is called one psi. The SI unit of pressure is newton per square meter which is called&nbsp; one pascal (Pa). There are so many situations when we measure the pressure but here we are only interested in atmospheric pressure. Atmospheric pressure is basically the force, whose effect is existed on all the surrounding things. Means, the weight of gases in atmosphere creates the atmospheric pressure.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/microcontrollerslab.com\/wp-content\/uploads\/2018\/08\/BMP-180-Atmospheric-Pressure-Sensor.jpg\"><img decoding=\"async\" src=\"https:\/\/microcontrollerslab.com\/wp-content\/uploads\/2018\/08\/BMP-180-Atmospheric-Pressure-Sensor.jpg?ezimgfmt=rs:640x640\/rscb1\/ngcb1\/notWebP\" alt=\"BMP 180 Atmospheric Pressure Sensor\" class=\"wp-image-7065\" \/><\/a><figcaption>Figure 1 BMP 180 Atmospheric Pressure Sensor<\/figcaption><\/figure><\/div>\n\n\n\n<p>For measuring the pressure of these gases atmospheric pressure sensor is used. It is a high precision low cost \u00a0sensing solution and especially designed for consumer applications such as weather forecast, sports devices ,GPS, computer peripherals, indoor navigation, hobby projects and vertical velocity indication etc. It can also be used as an altimeter because pressure is changed with altitude. It is easy to use and easy to solder on printed circuit board(PCB) as well as it has small size and consume less power. If it used as a temperature sensor then it is prefect sensor. It is easily available on market or online shop. A simple BMP 180 atmospheric pressure sensor is shown in figure 1<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Pinout<\/h3>\n\n\n\n<p>Picture above shows the pinout of this sensor. It works on I2C communication protocol.&nbsp; It consists of four pins as shown in table below:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><tbody><tr><th><strong>Pins<\/strong><\/th><th><strong>Function<\/strong><\/th><\/tr><tr><td><strong>Vin<\/strong>&nbsp;( Power supply pin )<\/td><td>Connect 3.3 volts to this pin<\/td><\/tr><tr><td><strong>GND<\/strong><\/td><td>GND pin of power supply<\/td><\/tr><tr><td><strong>SCL<\/strong>&nbsp;( I2C clock pin )<\/td><td>Connect with SCL pin of any microcontroller<\/td><\/tr><tr><td><strong>SDA<\/strong>&nbsp;(I2C data pin )<\/td><td>Connect with SDA pin of any microcontroller<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">1.2: BMP180 Applications:<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Indoor navigation<\/li><li> GPS-enhancement for dead-reckoning, slope detection, etc.<\/li><li>Sport devices, e.g. altitude profile<\/li><li>Weather forecast<\/li><li>Vertical velocity indication (rise\/sink speed)<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">1.3 Sensor Operation:<\/h2>\n\n\n\n<p>Sensor operation<\/p>\n\n\n\n<p>The BMP180 comes as a fully calibrated, ready-to-use sensor module without the need for additional external circuitry. Pressure and temperature data are provided as 16 bit values, which, together with the stored cali- bration data, are used for temperature compensation on the external microcontroller. Data transfer can be performed via I2C or SPI interfaces.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. Connection with STM32:<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"821\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.02.33-PM-1024x821.png\" alt=\"\" class=\"wp-image-824\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.02.33-PM-1024x821.png 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.02.33-PM-300x240.png 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.02.33-PM-768x615.png 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.02.33-PM-1536x1231.png 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.02.33-PM-2048x1641.png 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.02.33-PM-1150x922.png 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.02.33-PM-750x601.png 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.02.33-PM-400x321.png 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.02.33-PM-250x200.png 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3. Code:<\/h2>\n\n\n\n<p>We start of creating a header file with name of bmp180.h<\/p>\n\n\n\n<p><\/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#ifndef BMP180_H_\n#define BMP180_H_\n#include &quot;stdio.h&quot;\n\n\ntypedef enum\n\t{\n\tOSS0=0,\n\tOSS1=1,\n\tOSS2=2,\n\tOSS3=3\n\t}OSS;\n\n\nvoid BMP180_init();\n\nvoid update_BMP180(OSS OSS);\nfloat get_temperature(void);\nfloat get_pressure(void);\n\n#endif \/* BMP180_H_ *\/\n<\/pre><\/div>\n\n\n\n<p>Now we can create the bmp180.c<\/p>\n\n\n\n<p>We start off by including bmp180.h 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;}\">#include &quot;BMP180.h&quot;<\/pre><\/div>\n\n\n\n<p>Another header files required 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;}\">#include &quot;i2c.h&quot;\n#include &quot;delay.h&quot;\n#include &quot;math.h&quot;<\/pre><\/div>\n\n\n\n<p>Then we define some macros for the slave device:<\/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 BMP_180_add \t\t0x77<\/pre><\/div>\n\n\n\n<p>From the datasheet, we need to read the calibration:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"451\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.08.35-PM-1024x451.png\" alt=\"\" class=\"wp-image-825\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.08.35-PM-1024x451.png 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.08.35-PM-300x132.png 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.08.35-PM-768x338.png 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.08.35-PM-1536x676.png 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.08.35-PM-2048x902.png 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.08.35-PM-1150x506.png 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.08.35-PM-750x330.png 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.08.35-PM-400x176.png 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.08.35-PM-250x110.png 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Since the start address is 0xAA, we can create a macro for that 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 EEPROM_St_add  \t0xAA<\/pre><\/div>\n\n\n\n<p>Since the calibration data is 11 variable of 16-bit, we can create an array to hold 22 byte 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;}\">uint8_t eeprom_data[22];<\/pre><\/div>\n\n\n\n<p>variable to hold the calibration data 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;}\">short AC1,AC2,AC3,B1,B2,MB,MC,MD;\nunsigned short AC4,AC5,AC6;<\/pre><\/div>\n\n\n\n<p>variable to hold uncompensated temperature and pressure:<\/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;}\">long UT,UP;<\/pre><\/div>\n\n\n\n<p>Variable to hold the data to be sent to the sensor:<\/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;}\">uint8_t data_tem[2],data_pres[3];<\/pre><\/div>\n\n\n\n<p>Extra variables to hold the calculation:<\/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\nlong X1 = 0;\nlong X2 = 0;\nlong X3 = 0;\nlong B3 = 0;\nlong B5 = 0;\nunsigned long B4 = 0;\nlong B6 = 0;\nunsigned long B7 = 0;\nlong Press = 0;<\/pre><\/div>\n\n\n\n<p>A structure to hold the pressure and temperature 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;}\">typedef struct\n\t{\n\tfloat temperature;\n\tfloat pressure;\n\t}BMP180Sensor_t;\n\tBMP180Sensor_t BMP180;<\/pre><\/div>\n\n\n\n<p>For initializing the sensor, we just need to read the calibration data and enable FPU in case if it is not enable 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;}\">void BMP180_init()\n\t\t{\n\t\t\tSCB-&gt;CPACR |= ((3UL &lt;&lt; 10*2)|(3UL &lt;&lt; 11*2)); \/\/enable FPU\n\n\t\t\ti2c_init();\n\t\t\ti2c_ReadMulti(BMP_180_add,EEPROM_St_add,22,(char *)eeprom_data);\n\t\t\tAC1=(eeprom_data[0]&lt;&lt;8)+eeprom_data[1];\n\t\t\tAC2=(eeprom_data[2]&lt;&lt;8)+eeprom_data[3];\n\t\t\tAC3=(eeprom_data[4]&lt;&lt;8)+eeprom_data[5];\n\t\t\tAC4=(eeprom_data[6]&lt;&lt;8)+eeprom_data[7];\n\t\t\tAC5=(eeprom_data[8]&lt;&lt;8)+eeprom_data[9];\n\t\t\tAC6=(eeprom_data[10]&lt;&lt;8)+eeprom_data[11];\n\t\t\tB1=(eeprom_data[12]&lt;&lt;8)+eeprom_data[13];\n\t\t\tB2=(eeprom_data[14]&lt;&lt;8)+eeprom_data[15];\n\t\t\tMB=(eeprom_data[16]&lt;&lt;8)+eeprom_data[17];\n\t\t\tMC=(eeprom_data[18]&lt;&lt;8)+eeprom_data[19];\n\t\t\tMD=(eeprom_data[20]&lt;&lt;8)+eeprom_data[21];\n\t\t}<\/pre><\/div>\n\n\n\n<p>Now we can update the sensor as following:<\/p>\n\n\n\n<p>For reading the temperature:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1010\" height=\"346\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.16.52-PM.png\" alt=\"\" class=\"wp-image-826\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.16.52-PM.png 1010w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.16.52-PM-300x103.png 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.16.52-PM-768x263.png 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.16.52-PM-750x257.png 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.16.52-PM-400x137.png 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.16.52-PM-250x86.png 250w\" sizes=\"(max-width: 1010px) 100vw, 1010px\" \/><\/figure>\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;}\">\t\t\ti2c_writeByte(BMP_180_add, 0xF4, 0x2E);\n\t\t\tdelayuS(4500);\n\t\t\ti2c_ReadMulti(BMP_180_add, 0xF6, 2, (char *)data_tem);\n\t\t\tUT=(data_tem[0]&lt;&lt;8)+data_tem[1];<\/pre><\/div>\n\n\n\n<p>For reading the pressure:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1010\" height=\"346\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.18.02-PM.png\" alt=\"\" class=\"wp-image-827\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.18.02-PM.png 1010w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.18.02-PM-300x103.png 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.18.02-PM-768x263.png 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.18.02-PM-750x257.png 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.18.02-PM-400x137.png 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.18.02-PM-250x86.png 250w\" sizes=\"(max-width: 1010px) 100vw, 1010px\" \/><\/figure>\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;}\">uint8_t oss;\n\t\t\tswitch (OSS)\n\t\t\t\t\t{\n\t\t\t\t\tcase OSS0: oss=0; break;\n\t\t\t\t\tcase OSS1: oss=1; break;\n\t\t\t\t\tcase OSS2: oss=2; break;\n\t\t\t\t\tcase OSS3: oss=3; break;\n\t\t\t\t\t}\n\n\t\t\ti2c_writeByte(BMP_180_add, 0xF4, 0x34+(oss&lt;&lt;6));\n\n\t\t\tswitch (OSS)\n\t\t\t\t{\n\t\t\tcase OSS0: delay(5);\toss=0; break;\n\t\t\tcase OSS1: delay(8);\toss=1; break;\n\t\t\tcase OSS2: delay(14);\toss=2; break;\n\t\t\tcase OSS3: delay(26);\toss=3; break;\n\t\t\t\t}\n\n\t\t\ti2c_ReadMulti(BMP_180_add, 0xF6, 3, (char *)data_pres);\n\t\t\tUP=((data_pres[0]&lt;&lt;16)+(data_pres[1]&lt;&lt;8)+(data_pres[2]))&gt;&gt;(8-oss);<\/pre><\/div>\n\n\n\n<p>After we acquired the data, we can start calculating the temperature as following:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1010\" height=\"346\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.19.44-PM.png\" alt=\"\" class=\"wp-image-828\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.19.44-PM.png 1010w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.19.44-PM-300x103.png 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.19.44-PM-768x263.png 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.19.44-PM-750x257.png 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.19.44-PM-400x137.png 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.19.44-PM-250x86.png 250w\" sizes=\"(max-width: 1010px) 100vw, 1010px\" \/><\/figure>\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;}\">\t\/\/calculate temperature\n\t\t\tlong x1=((UT-AC6) * (AC5\/(pow(2,15))));\n\t\t\tlong x2= ((MC)*(pow(2,11)))\/(x1+MD);\n\t\t\tlong B5= (x1+x2);\n\t\t\tBMP180.temperature= ((B5+8)\/(pow(2,4)))\/10;<\/pre><\/div>\n\n\n\n<p>for pressure:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1010\" height=\"1000\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.20.39-PM.png\" alt=\"\" class=\"wp-image-829\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.20.39-PM.png 1010w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.20.39-PM-300x297.png 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.20.39-PM-150x150.png 150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.20.39-PM-768x760.png 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.20.39-PM-750x743.png 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.20.39-PM-400x396.png 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-14-at-7.20.39-PM-250x248.png 250w\" sizes=\"(max-width: 1010px) 100vw, 1010px\" \/><\/figure>\n\n\n\n<p><\/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\t\t\t\/\/calculate pressure\n\t\t\t\tB6 = B5-4000;\n\t\t\t\tX1 = (B2 * (B6*B6\/(pow(2,12))))\/(pow(2,11));\n\t\t\t\tX2 = AC2*B6\/(pow(2,11));\n\t\t\t\tX3 = X1+X2;\n\t\t\t\tB3 = (((AC1*4+X3)&lt;&lt;oss)+2)\/4;\n\t\t\t\tX1 = AC3*B6\/pow(2,13);\n\t\t\t\tX2 = (B1 * (B6*B6\/(pow(2,12))))\/(pow(2,16));\n\t\t\t\tX3 = ((X1+X2)+2)\/pow(2,2);\n\t\t\t\tB4 = AC4*((unsigned long)(X3+32768))\/(pow(2,15));\n\t\t\t\tB7 = ((unsigned long)UP-B3)*(50000&gt;&gt;oss);\n\t\t\t\tif (B7&lt;0x80000000) {Press = (B7*2)\/B4;}\n\t\t\t\telse {Press = (B7\/B4)*2;}\n\t\t\t\tX1 = (Press\/(pow(2,8)))*(Press\/(pow(2,8)));\n\t\t\t\tX1 = (X1*3038)\/(pow(2,16));\n\t\t\t\tX2 = (-7357*Press)\/(pow(2,16));\n\t\t\t\tPress = Press + (X1+X2+3791)\/(pow(2,4));\n\t\t\tBMP180.pressure = Press;<\/pre><\/div>\n\n\n\n<p>Hence, the entire update sensor 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;}\">void update_BMP180(OSS OSS)\n\t\t{\n\n\t\t\/\/update temperature\n\n\t\t\ti2c_writeByte(BMP_180_add, 0xF4, 0x2E);\n\t\t\tdelayuS(4500);\n\t\t\ti2c_ReadMulti(BMP_180_add, 0xF6, 2, (char *)data_tem);\n\t\t\tUT=(data_tem[0]&lt;&lt;8)+data_tem[1];\n\t\t\t\/\/update pressure\n\t\t\tuint8_t oss;\n\t\t\tswitch (OSS)\n\t\t\t\t\t{\n\t\t\t\t\tcase OSS0: oss=0; break;\n\t\t\t\t\tcase OSS1: oss=1; break;\n\t\t\t\t\tcase OSS2: oss=2; break;\n\t\t\t\t\tcase OSS3: oss=3; break;\n\t\t\t\t\t}\n\n\t\t\ti2c_writeByte(BMP_180_add, 0xF4, 0x34+(oss&lt;&lt;6));\n\n\t\t\tswitch (OSS)\n\t\t\t\t{\n\t\t\tcase OSS0: delay(5);\toss=0; break;\n\t\t\tcase OSS1: delay(8);\toss=1; break;\n\t\t\tcase OSS2: delay(14);\toss=2; break;\n\t\t\tcase OSS3: delay(26);\toss=3; break;\n\t\t\t\t}\n\n\t\t\ti2c_ReadMulti(BMP_180_add, 0xF6, 3, (char *)data_pres);\n\t\t\tUP=((data_pres[0]&lt;&lt;16)+(data_pres[1]&lt;&lt;8)+(data_pres[2]))&gt;&gt;(8-oss);\n\n\t\t\t\/\/calculate temperature\n\t\t\tlong x1=((UT-AC6) * (AC5\/(pow(2,15))));\n\t\t\tlong x2= ((MC)*(pow(2,11)))\/(x1+MD);\n\t\t\tlong B5= (x1+x2);\n\t\t\tBMP180.temperature= ((B5+8)\/(pow(2,4)))\/10;\n\n\n\t\t\t\/\/calculate pressure\n\t\t\t\tB6 = B5-4000;\n\t\t\t\tX1 = (B2 * (B6*B6\/(pow(2,12))))\/(pow(2,11));\n\t\t\t\tX2 = AC2*B6\/(pow(2,11));\n\t\t\t\tX3 = X1+X2;\n\t\t\t\tB3 = (((AC1*4+X3)&lt;&lt;oss)+2)\/4;\n\t\t\t\tX1 = AC3*B6\/pow(2,13);\n\t\t\t\tX2 = (B1 * (B6*B6\/(pow(2,12))))\/(pow(2,16));\n\t\t\t\tX3 = ((X1+X2)+2)\/pow(2,2);\n\t\t\t\tB4 = AC4*((unsigned long)(X3+32768))\/(pow(2,15));\n\t\t\t\tB7 = ((unsigned long)UP-B3)*(50000&gt;&gt;oss);\n\t\t\t\tif (B7&lt;0x80000000) {Press = (B7*2)\/B4;}\n\t\t\t\telse {Press = (B7\/B4)*2;}\n\t\t\t\tX1 = (Press\/(pow(2,8)))*(Press\/(pow(2,8)));\n\t\t\t\tX1 = (X1*3038)\/(pow(2,16));\n\t\t\t\tX2 = (-7357*Press)\/(pow(2,16));\n\t\t\t\tPress = Press + (X1+X2+3791)\/(pow(2,4));\n\t\t\tBMP180.pressure = Press;\n\n\t\t}<\/pre><\/div>\n\n\n\n<p>For getting the temperature and pressure:<\/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;}\">\nfloat get_temperature(void)\n\t{\n\treturn BMP180.temperature;\n\t}\nfloat get_pressure(void)\n\t{\n\treturn BMP180.pressure;\n\t}\n<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>In 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;oled.h&quot;\n#include &quot;BMP180.h&quot;\nextern void SysClockConfig(void);\nfloat tmeperature,pressure;\nchar data_print[30];\n\nint main(void)\n{\n\t SysClockConfig();\n\t SSD1306_Init();\n\t BMP180_init();\n\twhile(1)\n\t\t{\n\t\tupdate_BMP180(OSS1);\n\t\ttmeperature=get_temperature();\n\t\tpressure=get_pressure();\n\t\tSSD1306_GotoXY(0,0);\n\t\tsprintf(data_print,&quot;P=%0.2f&quot;,pressure);\n\t\tSSD1306_Puts(data_print,&amp;Font_11x18, 1);\n\t\tSSD1306_GotoXY(0,30);\n\t\tsprintf(data_print,&quot;T=%0.2f&quot;,tmeperature);\n\t\tSSD1306_Puts(data_print,&amp;Font_11x18, 1);\n\t\tSSD1306_UpdateScreen();\n\t\tdelay(1000);\n\t\t}\n\n}\n<\/pre><\/div>\n\n\n\n<p>You may download the project from here:<\/p>\n\n\n\n<div class=\"wp-block-file\"><a href=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/BMP180_OLED.zip\">BMP180_OLED<\/a><a href=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/BMP180_OLED.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\">4. Results:<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/IMG_8071-1024x768.jpg\" alt=\"\" class=\"wp-image-831\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/IMG_8071-1024x768.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/IMG_8071-300x225.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/IMG_8071-768x576.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/IMG_8071-1536x1152.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/IMG_8071-2048x1536.jpg 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/IMG_8071-1150x863.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/IMG_8071-750x563.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/IMG_8071-400x300.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2022\/03\/IMG_8071-250x188.jpg 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Happy coding \ud83d\ude42<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, we shall use STM32 to acquire data from BMP180 temperature and pressure sensor and display the results on OLED display. In this guide, we shall cover the following: BMP180 Sensor. Connection with STM32. Code. Results. 1.1 BMP180 sensor: What is Atmospheric Pressure and BMP 180 Atmospheric Pressure Sensor?&nbsp;BMP 180 atmospheric pressure sensor [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,2,19,11,12],"tags":[],"class_list":["post-823","post","type-post","status-publish","format-standard","hentry","category-data-structures","category-embedded-systems","category-lcd","category-peripheral-drivers","category-stm32"],"_links":{"self":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/823"}],"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=823"}],"version-history":[{"count":1,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/823\/revisions"}],"predecessor-version":[{"id":832,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/823\/revisions\/832"}],"wp:attachment":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=823"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=823"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=823"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}