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
Revision 5:4135ec0f88e6, committed 2020-04-06
- Comitter:
- sebbarpar
- Date:
- Mon Apr 06 10:09:18 2020 +0000
- Parent:
- 4:d0d4760d32b2
- Child:
- 6:c7450b320c30
- Commit message:
- Commit;
Changed in this revision
--- a/MODSERIAL.lib Sat Feb 15 15:01:55 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://mbed.org/users/AjK/code/MODSERIAL/#ae0408ebdd68
--- a/main.cpp Sat Feb 15 15:01:55 2014 +0000 +++ b/main.cpp Mon Apr 06 10:09:18 2020 +0000 @@ -9,24 +9,44 @@ #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; -void rxCallback(MODSERIAL_IRQ_INFO *q) -{ - new_send = true; -} + int main() -{ +{ +//FILE *wrt=fopen("/local/out.txt","w"); + int pixel[QQVGA]; + int pixel2[QQVGA]; + camera.Init('y', QQVGA); + pc.printf("Camera initiated"); + //camera.CaptureNext(); + //while(camera.CaptureDone() == false); + camera.ReadStart(); + t1 = t.read_ms(); + t.start(); + for(int x = 0; x<QQVGA; x++) + { + pixel[x]=camera.ReadOnebyte(); + //fprintf(fp,"%i", pixel[x]); + //pixel2[x]=camera.ReadOnebyte(); + //fprintf(fp,"%i/n", pixel2[x]); + pc.putc(camera.ReadOnebyte()); + } + + camera.ReadStop(); + pc.printf("done in %f\r\n",t.read()); + //fclose(fp); + /* pc.baud(921600); pc.printf("SystemCoreClock: %dMHz\r\n", SystemCoreClock/1000000); // print the clock frequency led4 = 0; t.start(); - pc.attach(&rxCallback, MODSERIAL::RxIrq); + //pc.attach(&rxCallback, MODSERIAL::RxIrq); while(1) { @@ -135,7 +155,7 @@ }else if(strcmp("reset", word) == 0) { - mbed_reset(); + //mbed_reset(); }else if(strcmp("time", word) == 0) { @@ -197,5 +217,5 @@ while(camera.CaptureDone() == false); pc.printf("Snap_done\r\n"); - led4 = 0; + led4 = 0;*/ } \ No newline at end of file
--- a/main.h Sat Feb 15 15:01:55 2014 +0000 +++ b/main.h Mon Apr 06 10:09:18 2020 +0000 @@ -1,11 +1,10 @@ #pragma once #include "mbed.h" #include "ov7670.h" -#include "MODSERIAL.h" -MODSERIAL pc(USBTX,USBRX); +Serial pc(USBTX,USBRX); Timer t; bool new_send = false; @@ -18,11 +17,11 @@ //Camera OV7670 camera ( - p28,p27, // SDA,SCL(I2C / SCCB) - p23,NC,p25, // VSYNC,HREF,WEN(FIFO) - Port0,0x07878000, // PortIn data p18(P0.26),p17(P0.25),p16(P0.24),p15(P0.23),p11(P0.18),p12(P0.17),p14(P0.16),p13(P0.15) - p26,p29,p30 // RRST,OE,RCLK -); + PTE25,PTE24, // SDA,SCL(I2C / SCCB) + PTA1,PTC16,PTD2, // VSYNC,HREF,WEN(FIFO) + PTB23,PTA2,PTC2,PTC3,PTB11,PTB10,PTB3,PTB2, // Ds p18(P0.26),p17(P0.25),p16(P0.24),p15(P0.23),p11(P0.18),p12(P0.17),p14(P0.16),p13(P0.15) + PTB9,PTC4,PTC17 // RRST,OE,RCLK +); //RESET extern "C" void mbed_reset();
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-os.lib Mon Apr 06 10:09:18 2020 +0000 @@ -0,0 +1,1 @@ +https://github.com/ARMmbed/mbed-os/#c12b433026beae5b3b769c27941bc6d7fe5d4b27
--- a/mbed.bld Sat Feb 15 15:01:55 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/869cf507173a \ No newline at end of file
--- a/ov7670.lib Sat Feb 15 15:01:55 2014 +0000 +++ b/ov7670.lib Mon Apr 06 10:09:18 2020 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/edodm85/code/ov7670/#b40a945dd672 +https://os.mbed.com/users/sebbarpar/code/ov7670_lib/#46b8114bb5dd