Applause Enthusiasm Detection
1304410487@qq.com(讨论 | 贡献)2015年8月5日 (三) 02:17的版本 (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 |
---|
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
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 |