<?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>read battery status using nfc with nrf52832</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/45326/read-battery-status-using-nfc-with-nrf52832</link><description>Hi, 
 I am not yet familiar with NFC.I s it possible to read battery data from the NFC tag of the nRF52 to another device (for example a smartphone). I want to write simple application that reads battery status when the NFC tag is read by an NFC polling</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 27 Mar 2019 10:41:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/45326/read-battery-status-using-nfc-with-nrf52832" /><item><title>RE: read battery status using nfc with nrf52832</title><link>https://devzone.nordicsemi.com/thread/178618?ContentTypeID=1</link><pubDate>Wed, 27 Mar 2019 10:41:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25924fd4-bc14-4fc3-a53b-9a4c1e84c881</guid><dc:creator>pd@learner</dc:creator><description>&lt;p&gt;The problem is now solved. Actually problem is with my pca10040 board.I have tried with another pca10040 board and got required output.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: read battery status using nfc with nrf52832</title><link>https://devzone.nordicsemi.com/thread/178587?ContentTypeID=1</link><pubDate>Wed, 27 Mar 2019 09:17:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dfc23249-d0ca-4f49-8b8d-0301c196ccc5</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Ok. Do you get the callback from the saadc? Does it have any values, or is it 0?&lt;/p&gt;
&lt;p&gt;And en_text_rec, is it 0, or does it contain a value?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Have you tried debugging (turn off optimization in your project) to see where it fails?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: read battery status using nfc with nrf52832</title><link>https://devzone.nordicsemi.com/thread/178320?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2019 11:53:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:250a73ba-b4df-4ffe-a3e9-4cdce5918b66</guid><dc:creator>pd@learner</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;uint8_t  percentage_batt_lvl;

void get_battery_status()
{
	saadc_init();
	nrf_drv_saadc_sample();
	nrf_delay_us(200);
	nrf_drv_saadc_uninit();
  
}
void sperNum(uint8_t sepNum, uint8_t num[])
{
   
   num[0] = sepNum%10+48;
   num[1] = (sepNum/10)%10+48;
   num[2] = (sepNum/100)+48;
   
   
}
static void en_record_add(nfc_ndef_msg_desc_t * p_ndef_msg_desc)
{
/** @snippet [NFC text usage_1] */
uint32_t err_code;

static const uint8_t en_code[] = {&amp;#39;e&amp;#39;, &amp;#39;n&amp;#39;};

uint8_t p[3];

sperNum(percentage_batt_lvl,p);

NFC_NDEF_TEXT_RECORD_DESC_DEF(en_text_rec,
UTF_8,
en_code,
sizeof(en_code),
p,
sizeof(p));
/** @snippet [NFC text usage_1] */

err_code = nfc_ndef_msg_record_add(p_ndef_msg_desc,
&amp;amp;NFC_NDEF_TEXT_RECORD_DESC(en_text_rec));
APP_ERROR_CHECK(err_code);

}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I have called get_battery_status function in main context&amp;nbsp; in for loop.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: read battery status using nfc with nrf52832</title><link>https://devzone.nordicsemi.com/thread/178302?ContentTypeID=1</link><pubDate>Tue, 26 Mar 2019 11:13:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47dd010e-f9bd-404d-8be1-a0046c3e83b7</guid><dc:creator>Edvin</dc:creator><description>[quote user="pd@learner"]But when i am trying to read battery status every time it reads 0 value.&amp;nbsp;[/quote]
&lt;p&gt;&amp;nbsp;How exactly do you measure the battery level, and how do you pass on to the NFC?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: read battery status using nfc with nrf52832</title><link>https://devzone.nordicsemi.com/thread/178126?ContentTypeID=1</link><pubDate>Mon, 25 Mar 2019 13:40:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd1fa5ac-c8d7-4aac-a401-1cc1d26e58db</guid><dc:creator>pd@learner</dc:creator><description>&lt;p&gt;Thanks For quick response.&lt;/p&gt;
&lt;p&gt;I have tried sdk12.3.0\examples\nfc\record_text. It reads &amp;#39;Hello World&amp;#39; in three different languages. But when i am trying to read battery status every time it reads 0 value.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: read battery status using nfc with nrf52832</title><link>https://devzone.nordicsemi.com/thread/178119?ContentTypeID=1</link><pubDate>Mon, 25 Mar 2019 13:26:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63bd5565-fd6b-4a1e-820c-98f3774b6e9a</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Yes. You can write whatever data you want to the NFC tag. Please check out the example:&lt;/p&gt;
&lt;p&gt;SDK15.3.0\examples\nfc\record_text&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>