<?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>I need something similar to &amp;quot;pulseIn&amp;quot; of arduino in my nRF51822</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/4250/i-need-something-similar-to-pulsein-of-arduino-in-my-nrf51822</link><description>I am using a US-100 ULTRASONIC SENSOR MODULE, and I need to measure the pulse width that this sensor produce. In arduino we can use a metode called &amp;quot;pulseIn&amp;quot;, that gives you the measure of the pulse. My question is how can i make the same in my nRF51822</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 30 Oct 2014 16:53:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/4250/i-need-something-similar-to-pulsein-of-arduino-in-my-nrf51822" /><item><title>RE: I need something similar to "pulseIn" of arduino in my nRF51822</title><link>https://devzone.nordicsemi.com/thread/15176?ContentTypeID=1</link><pubDate>Thu, 30 Oct 2014 16:53:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7072917-3f88-44cf-a322-8d035bf73299</guid><dc:creator>Vebj&amp;#248;rn</dc:creator><description>&lt;p&gt;This has been asked &lt;a href="https://devzone.nordicsemi.com/question/17257/pulse-duration-on-a-pin/"&gt;before&lt;/a&gt; :)&lt;/p&gt;
&lt;p&gt;As the answer says, you can generate an interrupt when the pin goes high that starts a timer, and an interrupt when the pin goes low that stops the timer and calculates the time it took.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>