Pipe Inpection Robot
/
OV7670_make
v2
main.h@0:520e7ccaa52d, 2019-07-30 (annotated)
- Committer:
- kangmingyo
- Date:
- Tue Jul 30 09:05:12 2019 +0000
- Revision:
- 0:520e7ccaa52d
v2;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kangmingyo | 0:520e7ccaa52d | 1 | #pragma once |
kangmingyo | 0:520e7ccaa52d | 2 | #include "mbed.h" |
kangmingyo | 0:520e7ccaa52d | 3 | #include "ov7670.h" |
kangmingyo | 0:520e7ccaa52d | 4 | #include "FastPWM.h" |
kangmingyo | 0:520e7ccaa52d | 5 | |
kangmingyo | 0:520e7ccaa52d | 6 | |
kangmingyo | 0:520e7ccaa52d | 7 | |
kangmingyo | 0:520e7ccaa52d | 8 | |
kangmingyo | 0:520e7ccaa52d | 9 | Timer t; |
kangmingyo | 0:520e7ccaa52d | 10 | bool new_send = false; |
kangmingyo | 0:520e7ccaa52d | 11 | |
kangmingyo | 0:520e7ccaa52d | 12 | |
kangmingyo | 0:520e7ccaa52d | 13 | |
kangmingyo | 0:520e7ccaa52d | 14 | //Camera |
kangmingyo | 0:520e7ccaa52d | 15 | OV7670 camera |
kangmingyo | 0:520e7ccaa52d | 16 | ( |
kangmingyo | 0:520e7ccaa52d | 17 | D14,D15, // SDA,SCL(I2C / SCCB) |
kangmingyo | 0:520e7ccaa52d | 18 | D9,D8,NC, // VSYNC,HREF,WEN(FIFO) |
kangmingyo | 0:520e7ccaa52d | 19 | PortB,0xFF, // 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) |
kangmingyo | 0:520e7ccaa52d | 20 | NC,NC,D7 // RRST,OE,PCLK |
kangmingyo | 0:520e7ccaa52d | 21 | ); |
kangmingyo | 0:520e7ccaa52d | 22 | |
kangmingyo | 0:520e7ccaa52d | 23 | //RESET |
kangmingyo | 0:520e7ccaa52d | 24 | extern "C" void mbed_reset(); |
kangmingyo | 0:520e7ccaa52d | 25 | |
kangmingyo | 0:520e7ccaa52d | 26 | //Serial |
kangmingyo | 0:520e7ccaa52d | 27 | char word[25]; |
kangmingyo | 0:520e7ccaa52d | 28 | int t1 = 0; |
kangmingyo | 0:520e7ccaa52d | 29 | int t2 = 0; |
kangmingyo | 0:520e7ccaa52d | 30 | int t3 = 0; |
kangmingyo | 0:520e7ccaa52d | 31 | |
kangmingyo | 0:520e7ccaa52d | 32 | // |
kangmingyo | 0:520e7ccaa52d | 33 | void parse_cmd(); |
kangmingyo | 0:520e7ccaa52d | 34 | void CameraSnap(); |
kangmingyo | 0:520e7ccaa52d | 35 | void CameraGrab(); |