testing n-Bed with a Logitech C270 camera

Dependencies:   USBHost mbed

Fork of USBHostC270_example by Norimasa Okamoto

Files at this revision

API Documentation at this revision

Comitter:
chalikias
Date:
Mon Apr 27 19:54:05 2015 +0000
Parent:
12:ea4badc78215
Child:
14:449f809d07eb
Commit message:
tested

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Wed Mar 20 14:28:39 2013 +0000
+++ b/main.cpp	Mon Apr 27 19:54:05 2015 +0000
@@ -8,7 +8,7 @@
     pc.baud(921600);
 
     USBHostMSD* msd = new USBHostMSD("usb"); // USB flash drive
-    USBHostC270* cam = new USBHostC270(C270_MJPEG, C270_160x120, _5FPS); // Logitech C270
+    USBHostC270* cam = new USBHostC270(C270_MJPEG, C270_800x600, _1FPS); // Logitech C270
 
     uint8_t buf[1024*3];
     Timer interval_t;
@@ -22,6 +22,7 @@
             snprintf(path, sizeof(path), "/usb/image%02d.jpg", shot % 20);
             printf("%d %s %d bytes\n", shot, path, r);
             if (msd->connected()) {
+                printf("msd connected\n");
                 FILE* fp = fopen(path, "wb");
                 if (fp) {
                     fwrite(buf, r, 1, fp);
@@ -30,6 +31,9 @@
                 shot++;
                 leds = shot % 8;
             }
+            else {
+                printf("msd NOT connected\n");
+                }
             interval_t.reset();
         }
         if (!msd->connected()) {