![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
array size
Revision 0:d49bf1a75d35, committed 2015-08-22
- Comitter:
- rockstar
- Date:
- Sat Aug 22 10:14:05 2015 +0000
- Commit message:
- array size;
Changed in this revision
diff -r 000000000000 -r d49bf1a75d35 JPEGCamera.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/JPEGCamera.lib Sat Aug 22 10:14:05 2015 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/users/rockstar/code/JPEGCamera/#609037d25e10
diff -r 000000000000 -r d49bf1a75d35 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Aug 22 10:14:05 2015 +0000 @@ -0,0 +1,47 @@ +#include "mbed.h" +#include "JPEGCamera.h" +Serial pc(USBTX,USBRX); +DigitalOut led1(LED1); +DigitalOut led2(LED2); +DigitalOut led3(LED3); +DigitalOut led4(LED4); +DigitalOut signalPin(p25); +char diff; +int main() +{ + pc.baud(9600); + JPEGCamera camera(p9, p10); // TX, RX + LocalFileSystem local("local"); + Timer timer; + timer.start(); + pc.printf("Setting SIZE 160X120"); + camera.setPictureSize(JPEGCamera::SIZE160x120); + pc.printf("\nSetting SIZE 160X120 done and Taking reference image\n"); + int i=4; + while(i--){ + if (camera.isReady()) + { + char filename[32]; + sprintf(filename, "/local/image%d.jpg",i); + pc.printf("Picture: %s \r\n", filename); + if (camera.takePicture(filename)) + {while (camera.isProcessing()) camera.processPicture(); + } else pc.printf("take picture failed\n"); + } else pc.printf("camera is not ready\n"); + wait(0.5); + } + //pc.printf("Took IMG_REF\r\n"); + + /*while(pc.readable()==0 && signalPin==0){ + if (camera.isReady()) + { char filename[32]; + sprintf(filename, "/local/PICT.jpg"); + pc.printf("Picture: %s \r\n", filename); + if (camera.takePicture(filename)) + {while (camera.isProcessing()) camera.processPicture(); + } else pc.printf("take picture failed\n"); + }else pc.printf("camera is not ready\n"); + */ + pc.printf("Took PICT\r\n"); + //signalPin=1;} +} \ No newline at end of file
diff -r 000000000000 -r d49bf1a75d35 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Aug 22 10:14:05 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/4fc01daae5a5 \ No newline at end of file