Difference between revisions of "Open Source Welcome Door Report"
From Microduino Wiki
(→Bill of Material) |
(→Principle of the Experiment) |
||
Line 70: | Line 70: | ||
*'''Control part''':It’s divided into sound and light control. | *'''Control part''':It’s divided into sound and light control. | ||
**'''Shine''' units adopt '''[[Microduino-Color LED]]''' module, which can let the LED presents beautiful color. | **'''Shine''' units adopt '''[[Microduino-Color LED]]''' module, which can let the LED presents beautiful color. | ||
− | **'''Sound''' part processes audio files through '''[[Microduino-Audio]]''' module. '''[[Microduino-Amplifier]''' module the power amplify module drive the horn to produce sound. | + | **'''Sound''' part processes audio files through '''[[Microduino-Audio]]''' module. '''[[Microduino-Amplifier]]''' module the power amplify module drive the horn to produce sound. |
[[File:Doorwelcome1.jpg||600px|center]] | [[File:Doorwelcome1.jpg||600px|center]] | ||
Revision as of 02:05, 17 June 2016
ContentsOutline
Bill of Material
Principle of the Experiment
Program Download
Programming
Installation
Operating Instruction
The Instruction of the Code
{
//First passing D4, then passing D6 is entering.
if((digitalRead(body_pin) == 1) && (digitalRead(body_pin2) == 0))
{
FLAG_1 = 1;
delay(200);
}
if((digitalRead(body_pin) == 1) && (digitalRead(body_pin2) == 1) && (FLAG_1 == 1))
{
colorWipe(color[random(1, 10)]);
audio_choose(1);
Serial.println("COMING IN");
FLAG_1 = 0;
delay(1300); //1300
}
// First passing D6, then passing D4 is leaving.
if((digitalRead(body_pin) == 0) && (digitalRead(body_pin2) == 1))
{
FLAG_2 = 1;
delay(200); //2000
}
if((digitalRead(body_pin) == 1) && (digitalRead(body_pin2) == 1) && (FLAG_2 == 1))
{
colorWipe(color[random(1, 10)]);
audio_choose(2);
Serial.println("GOING OUT");
FLAG_2 = 0;
delay(1300); //2000
}
} FAQ
|