<?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>Changing Buzzer BEEP to tone</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70883/changing-buzzer-beep-to-tone</link><description>Hi, I am doing some development in nrf52810. where i want to use BUZZER to produce TONES 
 I am using SDK17.0.2 SES 
 I want to create tones instead of just beep sound in the buzzer like 
 G6 , A6, B6. these are represent the frequency like 2093 Hz ,</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 27 Jan 2021 14:01:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70883/changing-buzzer-beep-to-tone" /><item><title>RE: Changing Buzzer BEEP to tone</title><link>https://devzone.nordicsemi.com/thread/291524?ContentTypeID=1</link><pubDate>Wed, 27 Jan 2021 14:01:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80a134dd-13ef-4c85-af6b-15a2903b5f21</guid><dc:creator>Sunil vignesh</dc:creator><description>&lt;p&gt;HI Kenneth, &lt;/p&gt;
&lt;p&gt;&amp;nbsp;I found some thing in THNIGY52&amp;nbsp; that&lt;/p&gt;
&lt;p&gt;playing piano .And I have seen the SDK that having the function called&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;uint32_t drv_speaker_tone_start(uint16_t freq_hz, uint32_t duration_ms, uint8_t volume);&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;and i have used this to generate frequency in output . but i have an issue that &lt;/p&gt;
&lt;p&gt;i can&amp;#39;t find&amp;nbsp; &lt;strong&gt;arm_sin_f32(),&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;it through an error as undefined . but i include arm_math.h&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;even though it through an error .&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1611756053159v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;instead of arm_sin_f32 i used sin is it ok or i have to use arm_sin_f32&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing Buzzer BEEP to tone</title><link>https://devzone.nordicsemi.com/thread/291345?ContentTypeID=1</link><pubDate>Tue, 26 Jan 2021 16:12:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32cebbac-2223-4cbc-bcd0-aeb6adeec200</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;The PWM peripheral are going to play&amp;nbsp;whatever sequence that is in RAM, so if you need to output multi frequency tones you would need create a sequence that do this. I do not see any ready made example that can do this for you, it looks like even Arduino only support one tone at a time:&lt;br /&gt;&lt;a href="https://www.arduino.cc/reference/en/language/functions/advanced-io/tone/"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;span&gt;Only one tone can be generated at a time.&amp;nbsp;&lt;/span&gt;&amp;quot;&lt;a href="https://www.arduino.cc/reference/en/language/functions/advanced-io/tone/"&gt;&lt;br /&gt;https://www.arduino.cc/reference/en/language/functions/advanced-io/tone/&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing Buzzer BEEP to tone</title><link>https://devzone.nordicsemi.com/thread/291334?ContentTypeID=1</link><pubDate>Tue, 26 Jan 2021 15:17:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9aac8682-9188-4a42-be94-635d719086de</guid><dc:creator>Sunil vignesh</dc:creator><description>&lt;p&gt;I found some file buzzer.c and buzzer.h in this &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/2331/tone-library?ReplySortBy=CreatedDate&amp;amp;ReplySortOrder=Ascending"&gt;link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;is it for nrf51.&lt;/p&gt;
&lt;p&gt;There i found that &lt;strong&gt;buzzer_on (frequency , duration);&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;but i can&amp;#39;t able to convert to nrf52 &lt;/p&gt;
&lt;p&gt;can you help me to solve this&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing Buzzer BEEP to tone</title><link>https://devzone.nordicsemi.com/thread/291267?ContentTypeID=1</link><pubDate>Tue, 26 Jan 2021 12:52:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7579aef-59f4-404a-ae1b-127cfb0a0e34</guid><dc:creator>Sunil vignesh</dc:creator><description>&lt;p&gt;Hi Kenneth,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Thanks for the reply, I have seen that example that playing one frequency at the time i think so. but i have to genrate the tone like&lt;/p&gt;
&lt;p&gt;1478hz&amp;nbsp; - 1000ms&lt;/p&gt;
&lt;p&gt;2500hz&amp;nbsp; - 500ms&lt;/p&gt;
&lt;p&gt;3578hz&amp;nbsp; - 700ms&lt;/p&gt;
&lt;p&gt;2943hz&amp;nbsp; - 250ms&lt;/p&gt;
&lt;p&gt;all together one tone so. that i need to play multiple tones in button action&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;also i have seen TONE library in Arduino&lt;/p&gt;
&lt;p&gt;syntax like&lt;/p&gt;
&lt;div class="paragraph"&gt;
&lt;p&gt;&lt;code&gt;tone(pin, frequency)&lt;/code&gt;&lt;br /&gt; &lt;code&gt;tone(pin, frequency, duration)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;is there any library like this in nrf52&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Changing Buzzer BEEP to tone</title><link>https://devzone.nordicsemi.com/thread/291225?ContentTypeID=1</link><pubDate>Tue, 26 Jan 2021 09:55:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d176c36-648e-4323-b0f8-1953d1b8075d</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Maybe you can find this useful:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/52878/pwm-audio-driver"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/52878/pwm-audio-driver&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kenneth&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>