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.
main.cpp@0:78595d38d985, 2014-05-23 (annotated)
- Committer:
- ollyhicks
- Date:
- Fri May 23 20:48:07 2014 +0000
- Revision:
- 0:78595d38d985
Sort of working (terrible image)
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| ollyhicks | 0:78595d38d985 | 1 | #include "mbed.h" |
| ollyhicks | 0:78595d38d985 | 2 | #include "camera.h" |
| ollyhicks | 0:78595d38d985 | 3 | |
| ollyhicks | 0:78595d38d985 | 4 | /* |
| ollyhicks | 0:78595d38d985 | 5 | * Links |
| ollyhicks | 0:78595d38d985 | 6 | * https://gist.github.com/franciscospaeth/8503747 |
| ollyhicks | 0:78595d38d985 | 7 | * http://embeddedprogrammer.blogspot.co.uk/2012/07/hacking-ov7670-camera-module-sccb-cheat.html |
| ollyhicks | 0:78595d38d985 | 8 | * http://www.voti.nl/docs/OV7670.pdf |
| ollyhicks | 0:78595d38d985 | 9 | */ |
| ollyhicks | 0:78595d38d985 | 10 | |
| ollyhicks | 0:78595d38d985 | 11 | LocalFileSystem local("local"); |
| ollyhicks | 0:78595d38d985 | 12 | |
| ollyhicks | 0:78595d38d985 | 13 | int main() { |
| ollyhicks | 0:78595d38d985 | 14 | printf("\r\n\n\nSetup camera\r\n"); |
| ollyhicks | 0:78595d38d985 | 15 | camera_setup(); |
| ollyhicks | 0:78595d38d985 | 16 | printf(" Done!\r\n"); |
| ollyhicks | 0:78595d38d985 | 17 | |
| ollyhicks | 0:78595d38d985 | 18 | |
| ollyhicks | 0:78595d38d985 | 19 | printf("Take photo\r\n"); |
| ollyhicks | 0:78595d38d985 | 20 | FILE *fp = fopen("/local/img", "w"); |
| ollyhicks | 0:78595d38d985 | 21 | camera_grab(fp); |
| ollyhicks | 0:78595d38d985 | 22 | fclose(fp); |
| ollyhicks | 0:78595d38d985 | 23 | printf(" Done!\r\n"); |
| ollyhicks | 0:78595d38d985 | 24 | } |