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.
main.cpp
00001 #include "mbed.h" 00002 #include "JPEGCamera.h" 00003 Serial pc(SERIAL_TX,SERIAL_RX,38400); 00004 00005 int main() { 00006 JPEGCamera camera(D1, D0); // TX, RX 00007 // LocalFileSystem local("local"); 00008 Timer timer; 00009 timer.start(); 00010 camera.setPictureSize(JPEGCamera::SIZE320x240); 00011 00012 for (int i = 0; i < 10; i++) { 00013 if (camera.isReady()) { 00014 char filename[25]; 00015 sprintf(filename, "/local/pict%03d.jpg", i); 00016 printf("Picture: %s ", filename); 00017 if (camera.takePicture(filename)) { 00018 while (camera.isProcessing()) { 00019 camera.processPicture(); 00020 } 00021 } else { 00022 printf("take picture failed\n"); 00023 } 00024 } else { 00025 printf("camera is not ready\n"); 00026 } 00027 } 00028 printf("time = %f\n", timer.read()); 00029 }
Generated on Wed Aug 10 2022 02:03:22 by
1.7.2