<?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>Servo MG996R With nRF52840</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/66098/servo-mg996r-with-nrf52840</link><description>Hi, 
 I am working on the MG996R servo and MG90S with nRF52840. 
 I am using the following delay logic to operate MG90S. (As per datasheet) 
 MG90S is working perfectly fine. But MG996R create some issues (not moving correctly). So is there any servo</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 21 Sep 2020 13:37:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/66098/servo-mg996r-with-nrf52840" /><item><title>RE: Servo MG996R With nRF52840</title><link>https://devzone.nordicsemi.com/thread/270623?ContentTypeID=1</link><pubDate>Mon, 21 Sep 2020 13:37:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eaf6db93-dba5-4b2f-a95b-6f1a348fa5db</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;I have to echo what @awneil already has said here; could you elaborate what you mean when you say that it is &amp;#39;creating some issue ( not moving correctly )&amp;#39;? How is it moving, and how does it differ from what you would have expected?&lt;br /&gt;Could you also upload the specific datasheets you are referencing? Just to make sure that we are on the same page about this.&lt;br /&gt;&lt;br /&gt;Without having seen the datasheets; is the control of these different servos exactly the same? Is their period / frequency the same, for example? My hunch is that this could differ between the two different motors.&amp;nbsp;&lt;/p&gt;
[quote user=""]So is there any &lt;strong&gt;servo library&lt;/strong&gt; or &lt;strong&gt;.h&amp;nbsp;&lt;/strong&gt;file so we can use angle logic as available in &lt;strong&gt;Arduino.&lt;/strong&gt;[/quote]
&lt;p&gt;Unfortunately we do not provide arduino-style code libraries for specific components, no. However, most of these libraries are in really just a general peripheral library - like the ones we provide in our SDK - configured to the specific component.&lt;br /&gt;Have you seen the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_pwm.html"&gt;PWM Library&lt;/a&gt;, as demonstrated in the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/pwm_example.html"&gt;PWM Library example&lt;/a&gt;, or the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/group__nrfx__pwm.html"&gt;PWM Driver&lt;/a&gt; as demonstrated in &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/pwm_hw_example.html"&gt;the PWM driver example&lt;/a&gt;?&lt;br /&gt;I highly recommend making use of either the library or driver directly, to control your servos - instead of toggling pins with nrf_delays.&lt;br /&gt;Your above approach will not generate a stable waveform, especially not if you intend to combine it with BLE.&lt;br /&gt;There are also many posts on the forum already, describing how to control servos using either the library or driver - I highly recommend taking a look at either of these, to see how it can be done.&lt;br /&gt;&lt;br /&gt;Please do not hesitate to ask if anything should be unclear, or if you encounter any issues or questions!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Servo MG996R With nRF52840</title><link>https://devzone.nordicsemi.com/thread/270347?ContentTypeID=1</link><pubDate>Fri, 18 Sep 2020 13:25:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab234cf5-e48d-4ebb-af04-fc79c425de80</guid><dc:creator>awneil</dc:creator><description>[quote userid="67200" url="~/f/nordic-q-a/66098/servo-mg996r-with-nrf52840"]But &lt;strong&gt;MG996R&amp;nbsp;&lt;/strong&gt;create some issues (not moving correctly).&lt;br /&gt;[/quote]
&lt;p&gt;What &amp;quot;issues&amp;quot;, exactly?&lt;/p&gt;
&lt;p&gt;In what way(s) is it not &amp;quot;correct&amp;quot;?&lt;/p&gt;
&lt;p&gt;What have you done to verify that your code is actually generating the correct timings?&lt;/p&gt;
&lt;p&gt;Have you looked at the Arduino code to see what it actually does?&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/7080._5F00_Insert-Code-_2D00_-Nordic-2.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>