<?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>is it possible to send the data by using  interrupt</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/40610/is-it-possible-to-send-the-data-by-using-interrupt</link><description>hi... 
 i am using nrf52832 and sensor ......... is it possible to read the data by interrupting the sensor 
 for example .... 
 if i am using temperature sensor if the value goes to below 37 degree then it should send the data to uart ble (via app) is</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 22 Nov 2018 11:20:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/40610/is-it-possible-to-send-the-data-by-using-interrupt" /><item><title>RE: is it possible to send the data by using  interrupt</title><link>https://devzone.nordicsemi.com/thread/158609?ContentTypeID=1</link><pubDate>Thu, 22 Nov 2018 11:20:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:effc64c0-14f7-4f8e-9754-b8314155fc71</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;
static void value_from_sensor()          &amp;lt;-- is this supposed to be a function prototype?
                                             If so, it should have a semicolon

uint16_t threshold;

{
    value_from_sensor = read_sensor_data();   &amp;lt;-- From above, value_from_sensor is the name of a function
                                                  You cannot assign a value to the name of a function!

    if( value_from_sensor &amp;gt; threshold )
    {
        printf(&amp;quot;Data send.. \r\n&amp;quot;);
    }&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: is it possible to send the data by using  interrupt</title><link>https://devzone.nordicsemi.com/thread/158605?ContentTypeID=1</link><pubDate>Thu, 22 Nov 2018 11:16:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf07ca5a-ea19-4410-9408-766b1ce60269</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;You need to go back to your &amp;#39;C&amp;#39; textbook and see how to properly create a &amp;#39;C&amp;#39; program.&lt;/p&gt;
&lt;p&gt;Again, this is basic &amp;#39;C&amp;#39; coding - nothing specific to Nordic.&lt;/p&gt;
&lt;p&gt;It is generally easier to learn the &lt;em&gt;language&lt;/em&gt; on a PC or similar - where you have more convenient tools, and without all the added complications of embedded microcontrollers.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here are some &amp;#39;C&amp;#39; learning &amp;amp; reference materials - including a free online textbook:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blog.antronics.co.uk/2011/08/08/so-youre-thinking-of-starting-with-c/"&gt;http://blog.antronics.co.uk/2011/08/08/so-youre-thinking-of-starting-with-c/&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: is it possible to send the data by using  interrupt</title><link>https://devzone.nordicsemi.com/thread/158603?ContentTypeID=1</link><pubDate>Thu, 22 Nov 2018 11:07:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0384d55-8272-4056-b35d-c08f0c4eab73</guid><dc:creator>ps_anu</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void value_from_sensor()
uint16_t threshold;

{
value_from_sensor = read_sensor_data();

if( value_from_sensor &amp;gt; threshold )
{
 printf(&amp;quot;Data send.. \r\n&amp;quot;);
}&lt;/pre&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Capture-16.JPG" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: is it possible to send the data by using  interrupt</title><link>https://devzone.nordicsemi.com/thread/158600?ContentTypeID=1</link><pubDate>Thu, 22 Nov 2018 10:48:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e0b9a57-002f-4480-973f-1f8c85b21d2a</guid><dc:creator>awneil</dc:creator><description>[quote userid="74848" url="~/f/nordic-q-a/40610/is-it-possible-to-send-the-data-by-using-interrupt/158535"]i am getting error on this[/quote]
&lt;p&gt;Show what you did.&lt;/p&gt;
&lt;p&gt;Show what error(s) you got.&lt;/p&gt;
&lt;p&gt;Use copy &amp;amp; paste - don&amp;#39;t manually re-type.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;How to properly post source code:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/3527._5F00_Insert-Code-_2D00_-Nordic.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: is it possible to send the data by using  interrupt</title><link>https://devzone.nordicsemi.com/thread/158535?ContentTypeID=1</link><pubDate>Thu, 22 Nov 2018 06:54:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c49169a2-ade7-4a63-8c2e-bae3bb8370b4</guid><dc:creator>ps_anu</dc:creator><description>&lt;p&gt;how to declare the threshold&amp;nbsp;&lt;/p&gt;
&lt;p&gt;i am getting error on this&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: is it possible to send the data by using  interrupt</title><link>https://devzone.nordicsemi.com/thread/157908?ContentTypeID=1</link><pubDate>Mon, 19 Nov 2018 10:18:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d987703b-e82d-4561-bfbc-89a357e50b4d</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Go on:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;value_from_sensor = read_sensor_value();

if( value_from_sensor &amp;gt; my_threshold )
{
    // The value is above the threashold;
    // take appropriate action!
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: is it possible to send the data by using  interrupt</title><link>https://devzone.nordicsemi.com/thread/157878?ContentTypeID=1</link><pubDate>Mon, 19 Nov 2018 08:06:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cbc322ba-21b9-47c6-b559-dea38cbd542f</guid><dc:creator>ps_anu</dc:creator><description>&lt;p&gt;yeah you are correct&amp;nbsp; by using threshold ... how do that&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: is it possible to send the data by using  interrupt</title><link>https://devzone.nordicsemi.com/thread/157821?ContentTypeID=1</link><pubDate>Sat, 17 Nov 2018 10:08:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d569c4d3-50eb-43c4-9cec-710229056a3a</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Sorry, I don&amp;#39;t understand your question!&lt;/p&gt;
&lt;p&gt;An &amp;quot;interrupt&amp;quot; would normally be a signal &lt;em&gt;&lt;strong&gt;from&lt;/strong&gt; &lt;/em&gt;a sensor &lt;em&gt;&lt;strong&gt;to&lt;/strong&gt; &lt;/em&gt;the microcontroller - so you wouldn&amp;#39;t &amp;quot;&lt;em&gt;interrupt the sensor&lt;/em&gt;&amp;quot;.&lt;/p&gt;
&lt;p&gt;Some temperature sensors can be programmed with (a) threshold(s) - and may be able to&amp;nbsp; generate an interrupt &lt;strong&gt;&lt;em&gt;to &lt;/em&gt;&lt;/strong&gt;the microcontroller...&lt;/p&gt;
&lt;p&gt;You would have to study the particular sensor&amp;#39;s &lt;strong&gt;documentation&lt;/strong&gt; for details.&lt;/p&gt;
&lt;p&gt;Otherwise you would just read - or &amp;quot;&lt;em&gt;poll&lt;/em&gt;&amp;quot; - the sensor at a suitable, regular, interval and your code would compare&amp;nbsp;each reading against your threshold, and take whatever action is required.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>