![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
カメラ
main.cpp
- Committer:
- yamaguch
- Date:
- 2011-11-17
- Revision:
- 0:8399d5434f4f
File content as of revision 0:8399d5434f4f:
#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()); }