Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of IntervalShutter2 by
Revision 2:11af47fce11c, committed 2015-01-31
- Comitter:
- Honmaka
- Date:
- Sat Jan 31 07:17:24 2015 +0000
- Parent:
- 1:ca34f8960f93
- Commit message:
- IntervalShutter3
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Jan 27 12:41:50 2015 +0000
+++ b/main.cpp Sat Jan 31 07:17:24 2015 +0000
@@ -6,8 +6,18 @@
int main() {
Input.mode(PullDown);
+ int PreInput = 0;
+ int NowInput;
+ Camera1 = 0;
+ Camera2 = 0;
while(1) {
- Camera1 = Input;
- Camera2 = Input;
+ NowInput = Input;
+ if (NowInput != PreInput) {
+ Camera1 = NowInput;
+ wait(1);
+ Camera2 = NowInput;
+ }
+ PreInput = NowInput;
+ wait(0.1);
}
}
