Version 3: Trying to interleave capture and read
Dependencies: ov7670_lib Project_test
main.h@9:bfd025b059ab, 2020-06-22 (annotated)
- Committer:
- sebbarpar
- Date:
- Mon Jun 22 11:07:45 2020 +0000
- Revision:
- 9:bfd025b059ab
- Parent:
- 8:36adb37e976d
Coomit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
edodm85 | 0:19429e334b75 | 1 | #pragma once |
edodm85 | 0:19429e334b75 | 2 | #include "mbed.h" |
edodm85 | 0:19429e334b75 | 3 | #include "ov7670.h" |
edodm85 | 0:19429e334b75 | 4 | |
edodm85 | 0:19429e334b75 | 5 | |
edodm85 | 0:19429e334b75 | 6 | |
sebbarpar | 5:4135ec0f88e6 | 7 | Serial pc(USBTX,USBRX); |
edodm85 | 0:19429e334b75 | 8 | Timer t; |
edodm85 | 0:19429e334b75 | 9 | bool new_send = false; |
edodm85 | 0:19429e334b75 | 10 | |
sebbarpar | 8:36adb37e976d | 11 | DigitalOut led1(LED1,1); |
sebbarpar | 8:36adb37e976d | 12 | DigitalOut led2(LED2,1); |
sebbarpar | 8:36adb37e976d | 13 | DigitalOut led3(LED3,1); |
sebbarpar | 8:36adb37e976d | 14 | DigitalOut led4(LED4,1); |
edodm85 | 0:19429e334b75 | 15 | |
edodm85 | 0:19429e334b75 | 16 | |
edodm85 | 0:19429e334b75 | 17 | //Camera |
edodm85 | 0:19429e334b75 | 18 | OV7670 camera |
edodm85 | 0:19429e334b75 | 19 | ( |
sebbarpar | 5:4135ec0f88e6 | 20 | PTE25,PTE24, // SDA,SCL(I2C / SCCB) |
sebbarpar | 8:36adb37e976d | 21 | PTA1,PTD3,PTB11, // VSYNC,HREF,WEN(FIFO) |
sebbarpar | 8:36adb37e976d | 22 | PortC, 0x0F0F, // Ds |
sebbarpar | 8:36adb37e976d | 23 | PTD2,PTC4,PTD1 // RRST,OE,RCLK |
sebbarpar | 5:4135ec0f88e6 | 24 | ); |
edodm85 | 0:19429e334b75 | 25 | |
edodm85 | 0:19429e334b75 | 26 | //RESET |
edodm85 | 0:19429e334b75 | 27 | extern "C" void mbed_reset(); |
edodm85 | 0:19429e334b75 | 28 | |
edodm85 | 0:19429e334b75 | 29 | //Serial |
edodm85 | 2:bbd557817319 | 30 | char word[25]; |
edodm85 | 0:19429e334b75 | 31 | int t1 = 0; |
edodm85 | 0:19429e334b75 | 32 | int t2 = 0; |
edodm85 | 0:19429e334b75 | 33 | int t3 = 0; |
edodm85 | 0:19429e334b75 | 34 | |
edodm85 | 0:19429e334b75 | 35 | // |
edodm85 | 0:19429e334b75 | 36 | void parse_cmd(); |
edodm85 | 2:bbd557817319 | 37 | void CameraSnap(); |
edodm85 | 0:19429e334b75 | 38 | void CameraGrab(); |