Difference between revisions of "Say Cheese"
From Microduino Wiki
(Created page with "{{Language| Say Cheese }} {| style="width: 800px;" |- | ==Objective== Say "Cheese!" towards MIC, it will send out infrared signal and at the same time, the camera will take a ...") |
(→Hardware Buildup搭建硬件) |
||
Line 89: | Line 89: | ||
</source> | </source> | ||
− | ==Hardware | + | ==Hardware Buildup== |
*Setup1:Connect MIC sensor to A0 pin of the Sensorhub and infrared transmitting sensor to D6 pin. | *Setup1:Connect MIC sensor to A0 pin of the Sensorhub and infrared transmitting sensor to D6 pin. | ||
[[file: take_photo _setup_1.jpg |600px|center]] | [[file: take_photo _setup_1.jpg |600px|center]] | ||
Line 96: | Line 96: | ||
*Setup3:Stack all modules together without fixed order and finish the buildup. | *Setup3:Stack all modules together without fixed order and finish the buildup. | ||
[[file: take_photo _steup_ok.JPG|600px|center]] | [[file: take_photo _steup_ok.JPG|600px|center]] | ||
+ | |||
==Caution== | ==Caution== | ||
[[file: take_photo_case.JPG|600px|center]] | [[file: take_photo_case.JPG|600px|center]] |
Revision as of 03:45, 25 October 2015
Language: | English • 中文 |
---|
ContentsObjectiveSay "Cheese!" towards MIC, it will send out infrared signal and at the same time, the camera will take a picture. PrincipleEquipment
Program Download
Software Debugging
#define PHOTO 0xB4B8F
#define mic_pin A0
#define IR_pin 6
#define voice 400#define voice 400
if (voice_data > voice && take == false)
{
time = millis();
num++;
delay(10);
Serial.println(num);
if (num > 20)
{
take = true;
takePhoto();
Serial.println("takePhoto...");
}
}
else if (millis() - time > 1000 )//Take pictures after one second. {
voice_data = analogRead(mic_pin);
if (voice_data < voice)
{
num = 0;
take = false;
}
time = millis();
}
void takePhoto()
{
for (int i = 0; i < 3; i++)
{
irsend.sendSony(PHOTO, 20); // Sony code
delay(10);
}
} Hardware Buildup
CautionResultYell at MIC and trigger the camera. Video |