<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to Generate a Beep?]]></title><description><![CDATA[<p dir="auto">Hello, I am new to using these products. I have a Core2 and I am programming in Arduino. I just cannot figure out how to generate a beep with the speaker? Is this possible to do in Arduino? Should I get an M5 Stack 1 instead? I just need to generate a simple beep. Please let know if you have any input. Thank you.</p>
]]></description><link>https://community.m5stack.com/topic/3179/how-to-generate-a-beep</link><generator>RSS for Node</generator><lastBuildDate>Sat, 07 Mar 2026 12:40:16 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/3179.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 11 Apr 2021 08:54:59 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to Generate a Beep? on Mon, 18 Nov 2024 00:19:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/24388">@LostInSpace</a> I am quite new to all this so could you post a simple code of making a beep with your library.<br />
thank you<br />
Ioannis</p>
]]></description><link>https://community.m5stack.com/post/27065</link><guid isPermaLink="true">https://community.m5stack.com/post/27065</guid><dc:creator><![CDATA[ioamas]]></dc:creator><pubDate>Mon, 18 Nov 2024 00:19:42 GMT</pubDate></item><item><title><![CDATA[Reply to How to Generate a Beep? on Wed, 31 Aug 2022 19:34:32 GMT]]></title><description><![CDATA[<p dir="auto">I too had this need with my Core 2 Stack, so I wrote a few little routines that make sounds based on the M5Stack Atom Speaker code examples.</p>
<p dir="auto">The code is at,<br />
<a href="https://github.com/Hagtronics/M5Stack-Core2/tree/main/Sound" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/Hagtronics/M5Stack-Core2/tree/main/Sound</a></p>
]]></description><link>https://community.m5stack.com/post/18510</link><guid isPermaLink="true">https://community.m5stack.com/post/18510</guid><dc:creator><![CDATA[LostInSpace]]></dc:creator><pubDate>Wed, 31 Aug 2022 19:34:32 GMT</pubDate></item><item><title><![CDATA[Reply to How to Generate a Beep? on Sun, 03 Apr 2022 20:48:15 GMT]]></title><description><![CDATA[<p dir="auto">I could not here any sound on my system by using the method described above by <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/7104">@AgreeDK</a>. I figured out that you have to switch on the power supply for the integrated amplifier. This is controlled (like all other things needing power inside the Core2) by the APX192. To activate the Power supply use :</p>
<p dir="auto">M5.Axp.SetSpkEnable(1);</p>
]]></description><link>https://community.m5stack.com/post/17092</link><guid isPermaLink="true">https://community.m5stack.com/post/17092</guid><dc:creator><![CDATA[olliy78]]></dc:creator><pubDate>Sun, 03 Apr 2022 20:48:15 GMT</pubDate></item><item><title><![CDATA[Reply to How to Generate a Beep? on Sun, 19 Dec 2021 09:12:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/443">@ajb2k3</a> Thanks for the tip. Unfortunately it is not that easy when not using UIFlow.<br />
I am using VSCode + PIO with the Arduino framework</p>
]]></description><link>https://community.m5stack.com/post/15873</link><guid isPermaLink="true">https://community.m5stack.com/post/15873</guid><dc:creator><![CDATA[erich]]></dc:creator><pubDate>Sun, 19 Dec 2021 09:12:14 GMT</pubDate></item><item><title><![CDATA[Reply to How to Generate a Beep? on Sun, 19 Dec 2021 09:00:31 GMT]]></title><description><![CDATA[<p dir="auto"><img src="/assets/uploads/files/1639904412241-screenshot-2021-12-19-at-08.59.45.png" alt="0_1639904411062_Screenshot 2021-12-19 at 08.59.45.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">in UIFlow you use this block to make a bleep</p>
]]></description><link>https://community.m5stack.com/post/15871</link><guid isPermaLink="true">https://community.m5stack.com/post/15871</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sun, 19 Dec 2021 09:00:31 GMT</pubDate></item><item><title><![CDATA[Reply to How to Generate a Beep? on Sat, 18 Dec 2021 21:31:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/7104">@AgreeDK</a> Thanks a million for your solution, it does work perfectly with the Core2 !<br />
Just a shame there's no simple beep method in the core2 lib :(</p>
<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/8891">@Shift1313</a> as far as I understand, the .Speaker method you are referring to is not part of the M5Core lib, it is working with the Core but not with the Core2</p>
]]></description><link>https://community.m5stack.com/post/15864</link><guid isPermaLink="true">https://community.m5stack.com/post/15864</guid><dc:creator><![CDATA[erich]]></dc:creator><pubDate>Sat, 18 Dec 2021 21:31:46 GMT</pubDate></item><item><title><![CDATA[Reply to How to Generate a Beep? on Wed, 21 Apr 2021 20:56:38 GMT]]></title><description><![CDATA[<p dir="auto">I haven't tried this but in the .h file there is something called Speaker.setBeep .  That might just work.</p>
<p dir="auto">in the M5Stack.h file there is this.</p>
<pre><code>Speaker:
    M5.Speaker.tone(uint32_t freq);
    M5.Speaker.tone(freq, time);
    M5.Speaker.beep();
    M5.Speaker.setBeep(uint16_t frequency, uint16_t duration);
    M5.Speaker.mute();
</code></pre>
<p dir="auto">And if you open up the example "FactoryTest" there is a section in the code that uses dacWrite to the speaker pin.</p>
<p dir="auto">void startupLogo() {<br />
static uint8_t brightness, pre_brightness;<br />
uint32_t length = strlen((char*)m5stack_startup_music);<br />
M5.Lcd.setBrightness(0);<br />
M5.Lcd.pushImage(0, 0, 320, 240, (uint16_t *)gImage_logoM5);<br />
for(int i=0; i&lt;length; i++) {<br />
<strong>dacWrite(SPEAKER_PIN, m5stack_startup_music[i]&gt;&gt;2);<br />
delayMicroseconds(40);</strong><br />
brightness = (i/157);<br />
if(pre_brightness != brightness) {<br />
pre_brightness = brightness;<br />
M5.Lcd.setBrightness(brightness);<br />
}<br />
}</p>
<p dir="auto"><strong>The startup_music.c is found on another tab when you open the example code.</strong></p>
<p dir="auto">// SAMPLES:	40000,<br />
// BITSPERSAMPLE:	8,<br />
// CHANNELS:	1,<br />
// SAMPLERATE:	20000,<br />
// NORMALIZED:	FALSE,<br />
const unsigned char m5stack_startup_music[] = {</p>
<p dir="auto"><em><strong><strong>Lots of HEX here</strong></strong></em>*</p>
]]></description><link>https://community.m5stack.com/post/13586</link><guid isPermaLink="true">https://community.m5stack.com/post/13586</guid><dc:creator><![CDATA[Shift1313]]></dc:creator><pubDate>Wed, 21 Apr 2021 20:56:38 GMT</pubDate></item><item><title><![CDATA[Reply to How to Generate a Beep? on Sun, 18 Apr 2021 07:57:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/7104">@agreedk</a> thank you for reply. I keep getting a compile error. A beep isn't totally needed in my project so i'm just going to leave it out.</p>
]]></description><link>https://community.m5stack.com/post/13567</link><guid isPermaLink="true">https://community.m5stack.com/post/13567</guid><dc:creator><![CDATA[akaf24]]></dc:creator><pubDate>Sun, 18 Apr 2021 07:57:45 GMT</pubDate></item><item><title><![CDATA[Reply to How to Generate a Beep? on Sun, 18 Apr 2021 06:30:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/8603">@akaf24</a>  DATA should be 2 not 0, you dont need to change the last two items.<br />
( "CONFIG_I2S_DATA_IN_PIN" and "SPEAKER_I2S_NUMBER" )</p>
]]></description><link>https://community.m5stack.com/post/13565</link><guid isPermaLink="true">https://community.m5stack.com/post/13565</guid><dc:creator><![CDATA[AgreeDK]]></dc:creator><pubDate>Sun, 18 Apr 2021 06:30:25 GMT</pubDate></item><item><title><![CDATA[Reply to How to Generate a Beep? on Sat, 17 Apr 2021 21:55:36 GMT]]></title><description><![CDATA[<p dir="auto">thank you for the reply. I think I'm stuck on pin assignment. So on the back of my core2, it says BCLK is 12, LRCK is 0 and DATA is 0. But the example code also has "CONFIG_I2S_DATA_IN_PIN" and "SPEAKER_I2S_NUMBER" but I am not sure what to assign these as.</p>
]]></description><link>https://community.m5stack.com/post/13563</link><guid isPermaLink="true">https://community.m5stack.com/post/13563</guid><dc:creator><![CDATA[akaf24]]></dc:creator><pubDate>Sat, 17 Apr 2021 21:55:36 GMT</pubDate></item><item><title><![CDATA[Reply to How to Generate a Beep? on Sat, 17 Apr 2021 13:36:35 GMT]]></title><description><![CDATA[<p dir="auto">Just did a test, it will/can play a Beep om CORE2, just change Atom to CORE2 include, change the i2s pins and make one line a comment, the line not supported by CORE2.</p>
<p dir="auto">And yes, it is far to much code to get a Beep ;-)</p>
]]></description><link>https://community.m5stack.com/post/13553</link><guid isPermaLink="true">https://community.m5stack.com/post/13553</guid><dc:creator><![CDATA[AgreeDK]]></dc:creator><pubDate>Sat, 17 Apr 2021 13:36:35 GMT</pubDate></item><item><title><![CDATA[Reply to How to Generate a Beep? on Sat, 17 Apr 2021 09:43:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/8603">@akaf24</a>  You can try look at this:<br />
<a href="https://github.com/m5stack/M5Atom/tree/master/examples/ATOM_BASE/ATOM_SPK/PlayRawPCM" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/m5stack/M5Atom/tree/master/examples/ATOM_BASE/ATOM_SPK/PlayRawPCM</a><br />
It use the same chip as Core2 and play beeps ;-) so you migth be able to just change the i2S pins and the you go ;-)</p>
]]></description><link>https://community.m5stack.com/post/13551</link><guid isPermaLink="true">https://community.m5stack.com/post/13551</guid><dc:creator><![CDATA[AgreeDK]]></dc:creator><pubDate>Sat, 17 Apr 2021 09:43:52 GMT</pubDate></item><item><title><![CDATA[Reply to How to Generate a Beep? on Sat, 17 Apr 2021 09:25:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4502">@jesse-schein</a> haha wow, there's certainly a lot there. Thanks for this info. I just need to generate a simple beep once every few seconds, but it seems like I can only generate sound from from a wav or other file type? I was hoping there would be a tone() function, but I guess i'll just have to go through a few extra steps to get what I need.<br />
Edit: I just tried uploading some of these examples and they would not generate sound. I'll have to take a closer look at what's going on</p>
]]></description><link>https://community.m5stack.com/post/13550</link><guid isPermaLink="true">https://community.m5stack.com/post/13550</guid><dc:creator><![CDATA[akaf24]]></dc:creator><pubDate>Sat, 17 Apr 2021 09:25:18 GMT</pubDate></item><item><title><![CDATA[Reply to How to Generate a Beep? on Sat, 17 Apr 2021 09:15:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/6705">@bricoms</a> Thank you for the reply. I tried that example, but it did not work for me. I am using an M5 Stack core2 and that seems to be a library for just the Stack.</p>
]]></description><link>https://community.m5stack.com/post/13549</link><guid isPermaLink="true">https://community.m5stack.com/post/13549</guid><dc:creator><![CDATA[akaf24]]></dc:creator><pubDate>Sat, 17 Apr 2021 09:15:30 GMT</pubDate></item><item><title><![CDATA[Reply to How to Generate a Beep? on Fri, 16 Apr 2021 13:23:26 GMT]]></title><description><![CDATA[<p dir="auto">The original m5stack uses an analog speaker amplifier circuit. The core 2 uses digital so you'll need to use something like <a href="https://github.com/earlephilhower/ESP8266Audio" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/earlephilhower/ESP8266Audio</a> in order to store files in flash/sd/internet and play them back over i2s.</p>
<p dir="auto">I've had great quality and volume coming through the speakers this way. I suggest you look into the github link I posted for examples, they have totally complete examples using internet sources but if you just read the examples on that github you can see how to adopt it for sd/spiffs files with ease.</p>
]]></description><link>https://community.m5stack.com/post/13544</link><guid isPermaLink="true">https://community.m5stack.com/post/13544</guid><dc:creator><![CDATA[jesse-schein]]></dc:creator><pubDate>Fri, 16 Apr 2021 13:23:26 GMT</pubDate></item><item><title><![CDATA[Reply to How to Generate a Beep? on Wed, 14 Apr 2021 17:55:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/8603">@akaf24</a></p>
<p dir="auto">Well.. so sorry... you are right!<br />
I was certain i took the code from there but i was wrong. It is on the main m5stack library<br />
check here:<br />
<a href="https://github.com/m5stack/M5Stack/tree/master/examples/Basics/Speaker" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/m5stack/M5Stack/tree/master/examples/Basics/Speaker</a></p>
<p dir="auto">If i dont remember wrong (again) it worked for me.</p>
<p dir="auto">Sorry again.</p>
]]></description><link>https://community.m5stack.com/post/13525</link><guid isPermaLink="true">https://community.m5stack.com/post/13525</guid><dc:creator><![CDATA[BricoMS]]></dc:creator><pubDate>Wed, 14 Apr 2021 17:55:36 GMT</pubDate></item><item><title><![CDATA[Reply to How to Generate a Beep? on Wed, 14 Apr 2021 03:22:42 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for the reply. I cannot find any examples for this. I clicked through all the given examples and nothing came up when I searched "beep" or "tone" or "speaker". I looked through the library I have installed on arduino, and also this one that has more examples: <a href="https://github.com/m5stack/M5Core2" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/m5stack/M5Core2</a></p>
]]></description><link>https://community.m5stack.com/post/13512</link><guid isPermaLink="true">https://community.m5stack.com/post/13512</guid><dc:creator><![CDATA[akaf24]]></dc:creator><pubDate>Wed, 14 Apr 2021 03:22:42 GMT</pubDate></item><item><title><![CDATA[Reply to How to Generate a Beep? on Mon, 12 Apr 2021 15:22:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/8603">@akaf24</a><br />
The arduino library examples folder has a beep demo fore Core2</p>
]]></description><link>https://community.m5stack.com/post/13505</link><guid isPermaLink="true">https://community.m5stack.com/post/13505</guid><dc:creator><![CDATA[BricoMS]]></dc:creator><pubDate>Mon, 12 Apr 2021 15:22:41 GMT</pubDate></item></channel></rss>