Difference between revisions of "Open Source Welcome Door Report"
From Microduino Wiki
Line 90: | Line 90: | ||
|- | |- | ||
|width="50%" valign="top" align="left"| | |width="50%" valign="top" align="left"| | ||
− | *'''Step1''' | + | *'''Step1''': |
**'''As the following figure shows''', fix '''[[Microduino-Cube-S1]]''' on the floor '''structure A2''' with '''nylon screws''' and '''nylon studs''' . | **'''As the following figure shows''', fix '''[[Microduino-Cube-S1]]''' on the floor '''structure A2''' with '''nylon screws''' and '''nylon studs''' . | ||
**Stack the modules on the floor '''[[Microduino-Cube-S1]]''' in the following order. | **Stack the modules on the floor '''[[Microduino-Cube-S1]]''' in the following order. |
Latest revision as of 06:28, 30 September 2016
ContentsOutline
Bill of Material
Principle of the Experiment
Program Download
Programming
Assembly
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
|