カメラ

Dependencies:   mbed JPEGCamera

Files at this revision

API Documentation at this revision

Comitter:
yamaguch
Date:
Thu Nov 17 14:00:47 2011 +0000
Commit message:

Changed in this revision

JPEGCamera.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/JPEGCamera.lib	Thu Nov 17 14:00:47 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/yamaguch/code/JPEGCamera/#27417b6a951d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Nov 17 14:00:47 2011 +0000
@@ -0,0 +1,28 @@
+#include "mbed.h"
+#include "JPEGCamera.h"
+
+int main() {
+    JPEGCamera camera(p28, p27); // TX, RX
+    LocalFileSystem local("local");
+    Timer timer;
+    timer.start();
+    camera.setPictureSize(JPEGCamera::SIZE320x240);
+
+    for (int i = 0; i < 10; i++) {
+        if (camera.isReady()) {
+            char filename[32];
+            sprintf(filename, "/local/pict%03d.jpg", i);
+            printf("Picture: %s ", filename);
+            if (camera.takePicture(filename)) {
+                while (camera.isProcessing()) {
+                    camera.processPicture();
+                }
+            } else {
+                printf("take picture failed\n");
+            }
+        } else {
+            printf("camera is not ready\n");
+        }
+    }
+    printf("time = %f\n", timer.read());
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Nov 17 14:00:47 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912