<?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>Pin assign and check data</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/36907/pin-assign-and-check-data</link><description>Hi. I&amp;#39;m beginner of nRF. 
 
 I want to get some data from a temperature sensor, but I don&amp;#39;t know how to assign a pin. Also, how can I check the data ?? 
 
 In Arduino, there is a serial monitor that can check the value in real time. Is there any fuction</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 03 Sep 2018 07:34:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/36907/pin-assign-and-check-data" /><item><title>RE: Pin assign and check data</title><link>https://devzone.nordicsemi.com/thread/146891?ContentTypeID=1</link><pubDate>Mon, 03 Sep 2018 07:34:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:464625a4-0cb6-468f-a352-e4a63216e269</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;&lt;span style="font-weight:400;"&gt;It depends on what kind of sensor you have, different temperature sensors have different interfaces for reading out the data, for example:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Linear output voltage&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;SPI&amp;nbsp;communication&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;I2C&amp;nbsp;communication&lt;/span&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;Linear output voltage&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Some temperature sensors like&amp;nbsp;&lt;a href="https://www.dfrobot.com/wiki/index.php/DFRobot_LM35_Linear_Temperature_Sensor_(SKU:DFR0023)"&gt;this&lt;/a&gt;&amp;nbsp;only consist of ground, VDD and output voltage. Then you connect the pins as followed:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;VDD on nRF52 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;→ VCC on sensor board&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;GND on nRF52 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;→ GND on sensor board&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;Any input pin on nRF52 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;→ Output pin on sensor board&lt;/span&gt;&lt;span style="font-weight:400;"&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;SPI&amp;nbsp;communication&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;a href="https://www.sparkfun.com/products/13266"&gt;This&lt;/a&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;&lt;a href="https://www.sparkfun.com/products/13266"&gt;&lt;/a&gt;&amp;nbsp;sensor uses SPI communication and the sensor values can be retrieved using the&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Fspi_master_example.html"&gt;SPI Master Example&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;SPI communication includes&amp;nbsp;a single master and one or more slaves, which uses four signals: SCLK, MOSI, MISO and SS (&lt;a href="https://en.wikipedia.org/wiki/Serial_Peripheral_Interface"&gt;wikipedia&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;gives a more in-depth explanation). If using the provided SPI example (sdk 15.0.0), the pins should be connected in the following manner:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;SS: Pin 29 on nRF52 (master) &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;→ CS on sensor board&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;MISO: Pin 28 on nRF52 (master) &amp;nbsp;&amp;nbsp;&amp;nbsp;→ SO on sensor board&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;VDD on nRF52 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;→ VCC on sensor board&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;GND on nRF52 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;→ GND on sensor board&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;*nRF52 is master and the sensor is slave&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;I2C&amp;nbsp;communication&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;If you are using I2C interface (like&amp;nbsp;&lt;a href="https://international.switch-science.com/catalog/1813/"&gt;this&lt;/a&gt; &lt;/span&gt;&lt;span style="font-weight:400;"&gt;digital temperature sensor), you can use the&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Ftwi_sensor_example.html"&gt;TWI Sensor Example&lt;/a&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;.&amp;nbsp;&lt;a href="https://en.wikipedia.org/wiki/I%C2%B2C"&gt;I2C Communication&lt;/a&gt;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;&amp;nbsp;uses a Serial Data Line (SDA) and a Serial Clock Line (SCL), and requires a master (nRF52 chip) and a slave (temperature sensor). In the TWI Sensor example &lt;span&gt;(sdk 15.0.0)&lt;/span&gt;, the SDA and SCL is defined to respectively pin 26 and 27. Then you have to connect it accordingly:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;SDA: Pin 26 on nRF52 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;→ SDA on sensor board&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;SCL: Pin 27 on nRF52 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;→ SCL on sensor board&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;VDD on nRF52 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;→ VCC on sensor board&lt;/span&gt;&lt;/li&gt;
&lt;li style="font-weight:400;"&gt;&lt;span style="font-weight:400;"&gt;GND on nRF52 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;→ GND on sensor board&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;*nRF52 is master and the sensor is slave&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="text-decoration:underline;"&gt;Logging&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;If you want to check the value in real time, you can do it through RTT or UART. That can be done by using the provided examples and setting NRF_LOG_ENABLED,&amp;nbsp;&lt;/span&gt;&lt;span style="font-weight:400;"&gt;and NRF_LOG_BACKEND_RTT_ENABLED/NRF_LOG_BACKEND_UART_ENABLED&amp;nbsp;to 1 in the sdk_config file. If using UART, you can download a&amp;nbsp;monitor like&amp;nbsp;&lt;a href="https://www.compuphase.com/software_termite.htm"&gt;Termite&lt;/a&gt;&amp;nbsp;to see the data. If using RTT, you can see the data by starting a debug session. More information about logging can be found&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/21189/how-to-enable-uart-or-rtt-logging-in-examples"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pin assign and check data</title><link>https://devzone.nordicsemi.com/thread/141607?ContentTypeID=1</link><pubDate>Fri, 27 Jul 2018 07:33:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05102662-43fb-4d40-9c64-e62f44835e51</guid><dc:creator>FrankX2138</dc:creator><description>&lt;p&gt;Hi Kim&lt;/p&gt;
&lt;p&gt;I&amp;#39;m new too, for my experience I suggest you follow the following steps:&lt;/p&gt;
&lt;p&gt;1)&amp;nbsp;in the file board you can set the pins where to connect the temperature sensor (&amp;nbsp;if the sensor is resistive type )&lt;/p&gt;
&lt;p&gt;2)&amp;nbsp;if the sensor is digital with I2C or TWI communication, if you are using a board with nfr52, things get a lot more complicated.&amp;nbsp;look at my post a few days before&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/36599/how-implement-step-for-connect-sensor-type-i2c-or-twi"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/36599/how-implement-step-for-connect-sensor-type-i2c-or-twi&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I also have the same problem with Segger Studio, I use a Mac and I have not figured out how to print the logs yet. I created an app on the iPad similar to Nordic Connect where I can print the logs of the peripheral or cental BLE, to do this you have to create a characteristic&amp;nbsp;&amp;nbsp;that updates you and monitors the values that interest you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>