<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Interrupt based temperature sensor on nrf52840  using SDK v15.0.0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/34636/interrupt-based-temperature-sensor-on-nrf52840-using-sdk-v15-0-0</link><description>I have to implement temperature sensor readings continuously through interrupts instead of busy waiting example in SDK in order to notify those values over BLE to cloud. 
 I took code in below reference and compiled in SDK v15.0.0 on nrf52840. 
 https</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 23 May 2018 12:35:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/34636/interrupt-based-temperature-sensor-on-nrf52840-using-sdk-v15-0-0" /><item><title>RE: Interrupt based temperature sensor on nrf52840  using SDK v15.0.0</title><link>https://devzone.nordicsemi.com/thread/133001?ContentTypeID=1</link><pubDate>Wed, 23 May 2018 12:35:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3cdd969f-22b2-46c6-8482-d1d25cead6ae</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;yes, you can divide temp by 4 to get decimal points:&lt;/p&gt;
&lt;p&gt;int temp;&lt;br /&gt; float temp_float;&lt;br /&gt; (void)sd_temp_get(&amp;amp;temp);&lt;br /&gt; &lt;br /&gt; temp_float = temp * 0.25f;&lt;/p&gt;
&lt;p&gt;NRF_LOG_INFO(&amp;quot;Temperature: &amp;quot; NRF_LOG_FLOAT_MARKER , NRF_LOG_FLOAT(temp_float));&lt;/p&gt;
&lt;p&gt;Note that the resolution is 0.25C and the accuracy (offset) is +- 5C, so you may want to consider using an external temperature sensor if you plan on measuring ambient temperature.&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52840.ps/temp.html?cp=2_0_0_5_27_1_0#unique_2060644509"&gt;http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52840.ps/temp.html?cp=2_0_0_5_27_1_0#unique_2060644509&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interrupt based temperature sensor on nrf52840  using SDK v15.0.0</title><link>https://devzone.nordicsemi.com/thread/132860?ContentTypeID=1</link><pubDate>Wed, 23 May 2018 06:05:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31e759ea-b300-4a7e-84a8-7094db5dd8e2</guid><dc:creator>Sridhar Jonnavittula</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have used sd_temp_get() and it is working. My another concern is : Is there any way to get temperature value in two decimal points like (25.46 instead of only 25)?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interrupt based temperature sensor on nrf52840  using SDK v15.0.0</title><link>https://devzone.nordicsemi.com/thread/132813?ContentTypeID=1</link><pubDate>Tue, 22 May 2018 14:52:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9238fc24-b532-4dad-97ed-8e50d33aaf7f</guid><dc:creator>AmbystomaLabs</dc:creator><description>&lt;p&gt;If you are running the SD the easiest way to get the temp is via the API.&lt;/p&gt;
&lt;p&gt;static int32_t temp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/p&gt;
&lt;p&gt;err_code = sd_temp_get(&amp;amp;temp);&lt;br /&gt;APP_ERROR_CHECK(err_code);&lt;/p&gt;
&lt;p&gt;Though if you want precise timing driven temp measurements using an interrupt then the HTS example apparently does this using the registers and sends the data on BLE.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>