查看“Time-lapse Photography”的源代码
←
Time-lapse Photography
跳转至:
导航
、
搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{Language| Time-lapse Photography}} {| style="width: 800px;" |- | ==Objective == Use the key to set the time delay and take pictures with SONY camera after the setting. ==Principle== Here we can set the time delay by detecting how many times you press the key and use the infrared transmission sensor to control SONY camera. ==Equipment == {|class="wikitable" |- |Module||Number||Function |- |[[Microduino-CoreUSB]]||1||Core board |- |[[Microduino-Sensorhub]]||1||Sensor pin board |- | [[Microduino-IR transmitter]]||1||Infrared transmission sensor |- | [[Microduino-Crash]]||1||Crash sensor |} [[File:IR_Crash.jpg|600px|center|thumb]] ==Hardware Buildup == *Setup 1:Stack CoreUSB and Sensorhub together.。 [[File:CoreUSB_Sensorhub.jpg|600px|center|thumb]] *Setup 2:Connect the infrared transmitter to the D8 pin of Sensorhub and the crash sensor to the D2 pin of Sensorhub. [[file:Microduino-sensorhub_rule.JPG|thumb|800px|center]] [[File:ir_transmitter.jpg|600px|center|thumb]] ==Software Debugging软件调试== *Infrared remote control encoding definition. Here we adopt SONY encoding format. <source lang="cpp"> #define PHOTO 0xB4B8F //SONY camera ending #define KEY 2 //Key interface boolean keyFlag = false; //Key flag unsigned long timeFlag = 0; //Time flag int delayTime = 0; IRsend irsend; </source> [[File:Microduino_photo_ir.png||300px|center|thumb]] *Judge how many time you press the key. If you can't detect the next press-down within one second of the last press-down, it means you've finished pressing down. Then, after delaying for a certain period of time, it'll send photo encoding and control the camera to take photos. <source lang="cpp"> if((millis()> timeFlag+1000)&&delayTime>0) // Judge how many time you press the key. If you can't detect the next press-down within one second of the last press-down, it means you've finished pressing down. { delay(delayTime*1000); //Set the delay time according to how many times you press down. for (int i = 0; i < 3; i++) { irsend.sendSony(PHOTO, 20); //Send photographing instruction delay(10); } Serial.println("take photo"); delayTime = 0; } if(keyFlag==false && digitalRead(KEY)==LOW) //Judge if the key is pressed down. { keyFlag = true; } else if(keyFlag==true && digitalRead(KEY)==HIGH) //Judge if the key is released. { delayTime++; //The time of pressing the key+1 timeFlag = millis(); keyFlag=false; } delay(100); </source> ==Program== [[https://github.com/Microduino/Microduino_Tutorials/tree/master/MCookie_Tutorial/MicroduinoDelayPhoto MicroduinoDelayPhoto]] ==Result== Align the infrared transmission sensor to the infrared receiving head of the camera, set remote control mode, press the key for several times and then take pictures after a while. ==Video== |}
该页面使用的模板:
模板:Language
(
查看源代码
)
模板:Nmbox
(
查看源代码
)
返回至
Time-lapse Photography
。
导航菜单
个人工具
创建账户
登录
名字空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
Welcome
首页
创客大赛
大赛详情
3D打印
安装月球车
图形化编程
操控月球车
升级月球车
编程工具下载
软件下载
Arduino
Processing
Mixly
Scratch
模块套件
Microduino 102
mCookie 102
mCookie 202
mCookie 302
IBC
其他
应用套件
四轴飞行器
平衡车
小车CUBE
音乐播放器
刷卡音乐播放器
wifi气象站
彩虹音乐触摸灯
分贝检测仪
迎门汇报
LED点阵时钟
LED点阵屏幕
硬件
mCookie
Sensor
Microduino
MicroWrt
MicroNux
MicroRobot-Core
MicroRobot-CoreESP
ideaBoard
ideaBox
MicroMV
MicroAI
帮助
常见问题
帮助
工具
链入页面
相关更改
特殊页面
页面信息