<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-CN">
		<id>http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=Noise_Alarm</id>
		<title>Noise Alarm - 版本历史</title>
		<link rel="self" type="application/atom+xml" href="http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=Noise_Alarm"/>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Noise_Alarm&amp;action=history"/>
		<updated>2026-04-21T12:57:08Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=Noise_Alarm&amp;diff=9149&amp;oldid=prev</id>
		<title>1304410487@qq.com：Created page with &quot;{{Language|Noise Alarm}} {| style=&quot;width: 800px;&quot; |- | ==Objective== When noise reaches a certain value around you, the alarm goes off.    ==Principle==  ==Equipment== {|class...&quot;</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Noise_Alarm&amp;diff=9149&amp;oldid=prev"/>
				<updated>2015-08-04T03:30:56Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Language|Noise Alarm}} {| style=&amp;quot;width: 800px;&amp;quot; |- | ==Objective== When noise reaches a certain value around you, the alarm goes off.    ==Principle==  ==Equipment== {|class...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Language|Noise Alarm}}&lt;br /&gt;
{| style=&amp;quot;width: 800px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
==Objective==&lt;br /&gt;
When noise reaches a certain value around you, the alarm goes off. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Principle==&lt;br /&gt;
&lt;br /&gt;
==Equipment==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Module||Number||Function&lt;br /&gt;
|-&lt;br /&gt;
|[[Microduino-CoreUSB]]||1||Core board &lt;br /&gt;
|-&lt;br /&gt;
|[[Microduino-Sensorhub]]||1||Sensor pinboard &lt;br /&gt;
|-&lt;br /&gt;
|[[Microduino-Mic]]||1||Sound detection sensor  &lt;br /&gt;
|-&lt;br /&gt;
|[[Microduino-Crash]]||1||Crash/touch switch &lt;br /&gt;
|-&lt;br /&gt;
|[[Microduino-BUZZER]]||1||Buzzer sensor  &lt;br /&gt;
|-&lt;br /&gt;
| [[Microduino-BM]]||1||Battery management  &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
 [[File: Noise_alarm.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
==Hardware Buildup==&lt;br /&gt;
*Setup 1：Connect CoreUSB to your PC, open program example, choose the right board and download program via the serial port.&lt;br /&gt;
&lt;br /&gt;
[[File: Noise_alarm_setup_1.jpg|600px|center|thumb]]&lt;br /&gt;
*Setup2：Connect Mic to the A0 pin of Sensorhub, buzzer to D6 and crash sensor to D4. &lt;br /&gt;
[[file:Microduino-sensorhub_rule.JPG|thumb|800px|center]]&lt;br /&gt;
[[file: Noise_alarm_sensor.JPG|thumb|800px|center]]&lt;br /&gt;
*Setup6：Connect battery to BM. &lt;br /&gt;
[[file: Noise_alarm _bm.JPG|thumb|800px|center]]&lt;br /&gt;
&lt;br /&gt;
==Software Debugging==&lt;br /&gt;
*Build IDE, connect CoreUSB to your PC and download program code. &lt;br /&gt;
[https://github.com/Microduino/Microduino_Tutorials/blob/master/MCookie_Tutorial/Noise_alarm/Noise_alarm.ino Noise_alarm]&lt;br /&gt;
Code description &lt;br /&gt;
*Control pin description &lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#define mic_pin A0&lt;br /&gt;
#define buzzer_pin 6&lt;br /&gt;
#define key_pin 4 &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Sound pre-set value  &lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
  #define voice 400&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
*If the sound value is greater than the preset value in one second, then the buzzer will give an alarm. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
    if (voice_data &amp;gt; voice)&lt;br /&gt;
  {&lt;br /&gt;
    if (millis() - time &amp;gt; 1000 )&lt;br /&gt;
    {&lt;br /&gt;
      voice_data = analogRead(mic_pin);&lt;br /&gt;
      if (voice_data &amp;gt; voice)&lt;br /&gt;
      {&lt;br /&gt;
        buzzer_speak = true;&lt;br /&gt;
        i = 200;&lt;br /&gt;
      }&lt;br /&gt;
      time = millis();&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
*Touch the key to close the sound. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
      if (key_get(key_pin, 0))&lt;br /&gt;
  {&lt;br /&gt;
    delay(200);&lt;br /&gt;
    buzzer_speak = false;&lt;br /&gt;
    time = millis();&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Result==&lt;br /&gt;
If the sound around you exceeds the default value within one second, the alarm will go off. You can press the key and close the sound. (You can also build a beautiful cover with LEGO.) &lt;br /&gt;
==Video==&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>1304410487@qq.com</name></author>	</entry>

	</feed>