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.
Dependencies: ov7670_lib Project_test
main.cpp
- Committer:
- sebbarpar
- Date:
- 2020-04-06
- Revision:
- 7:9e4e66a8554e
- Parent:
- 6:c7450b320c30
- Child:
- 8:36adb37e976d
File content as of revision 7:9e4e66a8554e:
/*
* Author: Edoardo De Marchi
* Date: 07/04/13
* Notes: OV7670 + FIFO AL422B camera test
*/
#include "main.h"
#define VGA 307200 //640*480
#define QVGA 76800 //320*240
#define QQVGA 19200 //160*120
//FileSystem local("local");
static char format = ' ';
static int resolution = 0;
int main()
{
//FILE *wrt=fopen("/local/out.txt","w");
int pixel[QVGA];
int pixel2[QVGA];
camera.Init('y', QVGA);
pc.printf("\r\nCamera initiated");
camera.CaptureNext();
while(camera.CaptureDone() == false);
camera.ReadStart();
t1 = t.read_ms();
t.start();
for(int x = 0; x<QVGA; x++)
{
pixel[x]=camera.ReadOnebyte();
//fprintf(fp,"%i", pixel[x]);
//pixel2[x]=camera.ReadOnebyte();
//fprintf(fp,"%i/n", pixel2[x]);
pc.printf("%d ", camera.ReadOnebyte());
}
camera.ReadStop();
pc.printf("done in %f\r\n",t.read());
//fclose(fp);
}