Applause Enthusiasm Detection
From Microduino Wiki
Revision as of 02:17, 5 August 2015 by 1304410487@qq.com (talk) (Created page with "{{Language|Applause Enthusiasm Detectio}} {| style="width: 800px;" |- | ==Objective== Here we’ll detect applause. The louder it gets, the brighter the light turns. When the ...")
Language: | English • 中文 |
---|
Contents[hide]ObjectiveHere we’ll detect applause. The louder it gets, the brighter the light turns. When the brightness gets to the most, the buzzer will give an alarm. PrincipleEquipment
File:Applause heat.jpg 600px Hardware Buildup
Software Debugging
Applause_heat Code description
#define PIN 4
Adafruit_NeoPixel strip = Adafruit_NeoPixel(6, PIN, NEO_GRB + NEO_KHZ800);
#define mic_pin A0
#define buzzer_pin 6
#define voice 400
if (voice_data > voice)
{
num++;
if (num > 255)
{
num = 255;
buzzer();
}
colorWipe(strip.Color(num, 0, 0));
//delay(10);
Serial.println(num);
time = millis();
} ResultThe louder the applause gets, the brighter the lamp becomes. When it reaches to the brightest, the buzzer will give an alarm. When the sound gets below the pre-set value after that, it will take three seconds and then turn off the light and the buzzer. (You can achieve a beautiful frame with LEGO.) Video |