├── .cproject
├── .gitignore
├── .metadata
├── .lock
├── .log
├── .mylyn
│ └── repositories.xml.zip
├── .plugins
│ ├── org.eclipse.cdt.core
│ │ └── .log
│ ├── org.eclipse.cdt.make.core
│ │ ├── specs.c
│ │ └── specs.cpp
│ ├── org.eclipse.core.resources
│ │ ├── .root
│ │ │ └── .indexes
│ │ │ │ ├── history.version
│ │ │ │ └── properties.version
│ │ └── .safetable
│ │ │ └── org.eclipse.core.resources
│ ├── org.eclipse.core.runtime
│ │ └── .settings
│ │ │ ├── org.eclipse.cdt.ui.prefs
│ │ │ ├── org.eclipse.core.resources.prefs
│ │ │ ├── org.eclipse.e4.ui.css.swt.theme.prefs
│ │ │ ├── org.eclipse.mylyn.context.core.prefs
│ │ │ ├── org.eclipse.mylyn.monitor.ui.prefs
│ │ │ ├── org.eclipse.team.cvs.ui.prefs
│ │ │ ├── org.eclipse.team.ui.prefs
│ │ │ ├── org.eclipse.ui.ide.prefs
│ │ │ ├── org.eclipse.ui.prefs
│ │ │ └── org.eclipse.ui.workbench.prefs
│ ├── org.eclipse.e4.workbench
│ │ └── workbench.xmi
│ ├── org.eclipse.team.ui
│ │ └── syncParticipants.xml
│ └── org.eclipse.ui.workbench
│ │ ├── dialog_settings.xml
│ │ └── workingsets.xml
└── version.ini
├── .project
├── .settings
├── de.innot.avreclipse.core.prefs
└── org.eclipse.cdt.ui.prefs
├── AUTHORS
├── Camera
├── Camera.cpp
└── Camera.h
├── CameraAL422B
├── CameraAL422B.cpp
├── CameraAL422B.h
└── datasheet
│ ├── 3M-Bit Frame Buffer.pdf
│ ├── OV7670 + AL422B(FIFO) Camera Module(V2.0) Schematic.pdf
│ ├── OV7670 Implementation Guide (V1.0).pdf
│ ├── OV7670_CMOS.pdf
│ ├── OV7725 Camera Module with FIFO
│ ├── ArduinoCam
│ │ ├── Arduino
│ │ │ ├── libraries
│ │ │ │ ├── DigitalWriteFast
│ │ │ │ │ ├── DigitalWriteFast.h
│ │ │ │ │ ├── Readme.pdf
│ │ │ │ │ └── keywords.txt
│ │ │ │ ├── MIN_at_Camera
│ │ │ │ │ ├── MIN_at_Camera.cpp
│ │ │ │ │ └── MIN_at_Camera.h
│ │ │ │ ├── MIN_at_DS1307
│ │ │ │ │ ├── MIN_at_DS1307.cpp
│ │ │ │ │ └── MIN_at_DS1307.h
│ │ │ │ ├── MIN_at_TC74
│ │ │ │ │ ├── MIN_at_TC74.cpp
│ │ │ │ │ └── MIN_at_TC74.h
│ │ │ │ └── MIN_at_Tools
│ │ │ │ │ ├── MIN_at_Tools.cpp
│ │ │ │ │ └── MIN_at_Tools.h
│ │ │ └── sketchbook
│ │ │ │ └── ArduinoCam
│ │ │ │ ├── Base64.ino
│ │ │ │ ├── Bitmap.ino
│ │ │ │ ├── Camera.ino
│ │ │ │ ├── DS1307.ino
│ │ │ │ └── TC74.ino
│ │ ├── ArduinoCamHW.pdf
│ │ └── PC
│ │ │ ├── ArduinoCam.csproj
│ │ │ ├── ArduinoCam.sln
│ │ │ ├── ArduinoCam.suo
│ │ │ ├── Form1.Designer.cs
│ │ │ ├── Form1.cs
│ │ │ ├── Form1.resx
│ │ │ ├── Program.cs
│ │ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ │ ├── bin
│ │ │ └── Debug
│ │ │ │ ├── ArduinoCam.exe
│ │ │ │ ├── ArduinoCam.pdb
│ │ │ │ └── ArduinoCam.vshost.exe
│ │ │ └── obj
│ │ │ └── Debug
│ │ │ ├── ArduinoCam.csproj.FileListAbsolute.txt
│ │ │ ├── ArduinoCam.exe
│ │ │ ├── ArduinoCam.pdb
│ │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache
│ │ │ ├── ResGen.read.1.tlog
│ │ │ ├── ResGen.write.1.tlog
│ │ │ └── SSTV.Form1.resources
│ ├── CMOS_AL422_STM32F103ZET6_ili9328.rar
│ ├── OV7725+AL422_REV1.21_PCB.pdf
│ ├── OV7725+AL422_REV1.21_SCH.pdf
│ ├── OV7725_CSP2_DS.pdf
│ ├── Read Me.txt
│ ├── al422.pdf
│ └── ov7725_cam_fifo.PNG
│ ├── al422.pdf
│ └── from_kernel.h
├── CameraOV7670
├── CameraOV7670.cpp
├── CameraOV7670.h
└── datasheet
│ ├── .goutputstream-8KP7NW
│ ├── .goutputstream-WAXWNW
│ ├── .goutputstream-ZL6RNW
│ ├── AL422B_Data_Sheets.pdf
│ ├── Atmega168PinMap2.png
│ ├── OV7670 Arduino pins.pdf
│ ├── camera_pins.pdf
│ ├── datasheet.pdf
│ ├── description.pdf
│ ├── img.jpg
│ ├── ov7670.jpg
│ └── ov7670_camera_sensor_success.pdf
├── CameraVC0706
├── CameraVC0706.cpp
├── CameraVC0706.h
├── datasheet
│ ├── 0libArduinoCamera.a
│ ├── VC0706protocol.pdf
│ └── libArduinoCamera.a
└── example
│ ├── interacting
│ └── interacting.ino
│ └── simple_snap
│ ├── a.out
│ └── simple_snap.cpp
├── Documentation.pdf
├── LICENSE
├── Makefile
├── README.md
├── doxygen.conf
└── nbproject
├── Package-Default.bash
├── configurations.xml
├── private
├── Default.properties
├── configurations.xml
└── private.xml
└── project.xml
/.cproject:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files
2 | *.slo
3 | *.lo
4 | *.o
5 | *.obj
6 |
7 | # Compiled Dynamic libraries
8 | *.so
9 | *.dylib
10 | *.dll
11 |
12 | # Compiled Static libraries
13 | *.lai
14 | *.la
15 | *.a
16 | *.lib
17 |
18 | # Executables
19 | *.exe
20 | *.out
21 | *.app
22 |
23 | Release/*
24 | Debug/*
25 |
26 |
--------------------------------------------------------------------------------
/.metadata/.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/.metadata/.lock
--------------------------------------------------------------------------------
/.metadata/.log:
--------------------------------------------------------------------------------
1 | !SESSION 2013-02-02 14:48:13.539 -----------------------------------------------
2 | eclipse.buildId=M20130116-1800
3 | java.version=1.7.0_11
4 | java.vendor=Oracle Corporation
5 | BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
6 | Framework arguments: -product org.eclipse.epp.package.cpp.product
7 | Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.cpp.product
8 |
9 | !ENTRY org.eclipse.ui 4 4 2013-02-02 14:48:31.575
10 | !MESSAGE Plug-in 'org.eclipse.cdt.ui' contributed an invalid Menu Extension (Path: 'project/org.eclipse.cdt.ui.prjmenu' is invalid): org.eclipse.cdt.ui.manageConfigsAction2
11 |
12 | !ENTRY org.eclipse.ui 4 4 2013-02-02 14:48:31.580
13 | !MESSAGE Plug-in 'org.eclipse.cdt.ui' contributed an invalid Menu Extension (Path: 'project/org.eclipse.cdt.ui.prjmenu' is invalid): org.eclipse.cdt.ui.buildConfigMenuAction
14 |
15 | !ENTRY org.eclipse.ui 4 4 2013-02-02 14:48:31.580
16 | !MESSAGE Plug-in 'org.eclipse.cdt.ui' contributed an invalid Menu Extension (Path: 'project/org.eclipse.cdt.ui.prjmenu' is invalid): org.eclipse.cdt.ui.wsselection
17 | !SESSION 2013-10-19 13:41:14.809 -----------------------------------------------
18 | eclipse.buildId=M20130204-1200
19 | java.version=1.7.0_17
20 | java.vendor=Oracle Corporation
21 | BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
22 | Framework arguments: -product org.eclipse.epp.package.cpp.product
23 | Command-line arguments: -data file:///storage/microcontroller/arduino/driver/camera -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.cpp.product
24 |
25 | !ENTRY de.fu_berlin.inf.dpp 2 0 2013-10-19 13:41:19.718
26 | !MESSAGE unexpected method call (NullSarosSession.java:66)
27 |
28 | !ENTRY de.fu_berlin.inf.dpp 2 0 2013-10-19 13:41:19.721
29 | !MESSAGE unexpected method call (NullSarosSession.java:66)
30 |
31 | !ENTRY de.fu_berlin.inf.dpp 2 0 2013-10-19 13:42:02.909
32 | !MESSAGE unexpected method call (NullSarosSession.java:66)
33 |
34 | !ENTRY de.fu_berlin.inf.dpp 2 0 2013-10-19 13:42:02.914
35 | !MESSAGE unexpected method call (NullSarosSession.java:66)
36 |
--------------------------------------------------------------------------------
/.metadata/.mylyn/repositories.xml.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/.metadata/.mylyn/repositories.xml.zip
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.cdt.core/.log:
--------------------------------------------------------------------------------
1 | *** SESSION Feb 02, 2013 14:44:47.02 -------------------------------------------
2 | *** SESSION Feb 02, 2013 14:45:17.04 -------------------------------------------
3 | *** SESSION Feb 02, 2013 14:48:18.67 -------------------------------------------
4 | *** SESSION Oct 19, 2013 13:41:21.70 -------------------------------------------
5 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/history.version:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.version:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.ui.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | spelling_locale_initialized=true
3 | useAnnotationsPrefPage=true
4 | useQuickDiffPrefPage=true
5 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | version=1
3 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.e4.ui.css.swt.theme.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | themeid=org.eclipse.e4.ui.css.theme.e4_classic
3 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.context.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | mylyn.attention.migrated=true
3 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.monitor.ui.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.mylyn.monitor.activity.tracking.enabled.checked=true
3 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.cvs.ui.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | pref_first_startup=false
3 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.ui.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.team.ui.first_time=false
3 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs:
--------------------------------------------------------------------------------
1 | PROBLEMS_FILTERS_MIGRATE=true
2 | eclipse.preferences.version=1
3 | platformState=1359853204058
4 | quickStart=false
5 | tipsAndTricks=true
6 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | showIntro=false
3 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs:
--------------------------------------------------------------------------------
1 | ENABLED_DECORATORS=org.eclipse.cdt.ui.indexedFiles\:false,org.eclipse.cdt.managedbuilder.ui.excludedFile\:true,org.eclipse.cdt.managedbuilder.ui.includeFolder\:true,org.eclipse.cdt.internal.ui.CustomBuildSettingsDecorator\:true,org.eclipse.egit.ui.internal.decorators.GitLightweightDecorator\:true,org.eclipse.linuxtools.tmf.ui.trace_folder.decorator\:true,org.eclipse.linuxtools.tmf.ui.experiment_folder.decorator\:true,org.eclipse.linuxtools.tmf.ui.linked_trace.decorator\:true,org.eclipse.mylyn.context.ui.decorator.interest\:true,org.eclipse.mylyn.tasks.ui.decorators.task\:true,org.eclipse.mylyn.team.ui.changeset.decorator\:true,org.eclipse.rse.core.virtualobject.decorator\:true,org.eclipse.rse.core.binary.executable.decorator\:true,org.eclipse.rse.core.script.executable.decorator\:true,org.eclipse.rse.core.java.executable.decorator\:true,org.eclipse.rse.core.library.decorator\:true,org.eclipse.rse.core.link.decorator\:true,org.eclipse.rse.subsystems.error.decorator\:true,org.eclipse.team.cvs.ui.decorator\:true,org.eclipse.ui.LinkedResourceDecorator\:true,org.eclipse.ui.VirtualResourceDecorator\:true,org.eclipse.ui.ContentTypeDecorator\:true,org.eclipse.ui.ResourceFilterDecorator\:false,
2 | eclipse.preferences.version=1
3 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.team.ui/syncParticipants.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
19 |
21 |
23 |
24 |
--------------------------------------------------------------------------------
/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.metadata/version.ini:
--------------------------------------------------------------------------------
1 | org.eclipse.core.runtime=1
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | ArduinoCamera
4 |
5 |
6 | ArduinoCore
7 | ArduinoIO
8 |
9 |
10 |
11 | org.eclipse.cdt.managedbuilder.core.genmakebuilder
12 | clean,full,incremental,
13 |
14 |
15 | ?name?
16 |
17 |
18 |
19 | org.eclipse.cdt.make.core.append_environment
20 | true
21 |
22 |
23 | org.eclipse.cdt.make.core.autoBuildTarget
24 | all
25 |
26 |
27 | org.eclipse.cdt.make.core.buildArguments
28 |
29 |
30 |
31 | org.eclipse.cdt.make.core.buildCommand
32 | make
33 |
34 |
35 | org.eclipse.cdt.make.core.buildLocation
36 | ${workspace_loc:/ArduinoCamera/Release}
37 |
38 |
39 | org.eclipse.cdt.make.core.cleanBuildTarget
40 | clean
41 |
42 |
43 | org.eclipse.cdt.make.core.contents
44 | org.eclipse.cdt.make.core.activeConfigSettings
45 |
46 |
47 | org.eclipse.cdt.make.core.enableAutoBuild
48 | false
49 |
50 |
51 | org.eclipse.cdt.make.core.enableCleanBuild
52 | true
53 |
54 |
55 | org.eclipse.cdt.make.core.enableFullBuild
56 | true
57 |
58 |
59 | org.eclipse.cdt.make.core.fullBuildTarget
60 | all
61 |
62 |
63 | org.eclipse.cdt.make.core.stopOnError
64 | true
65 |
66 |
67 | org.eclipse.cdt.make.core.useDefaultBuildCmd
68 | true
69 |
70 |
71 |
72 |
73 | org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
74 | full,incremental,
75 |
76 |
77 |
78 |
79 |
80 | org.eclipse.cdt.core.cnature
81 | org.eclipse.cdt.core.ccnature
82 | org.eclipse.cdt.managedbuilder.core.managedBuildNature
83 | org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
84 | de.innot.avreclipse.core.avrnature
85 |
86 |
87 |
--------------------------------------------------------------------------------
/.settings/de.innot.avreclipse.core.prefs:
--------------------------------------------------------------------------------
1 | avrtarget/ClockFrequency=16000000
2 | avrtarget/ExtRAMSize=0
3 | avrtarget/ExtendedRAM=false
4 | avrtarget/MCUType=atmega328p
5 | avrtarget/UseEEPROM=false
6 | avrtarget/UseExtendedRAMforHeap=true
7 | eclipse.preferences.version=1
8 |
--------------------------------------------------------------------------------
/.settings/org.eclipse.cdt.ui.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | formatter_settings_version=1
3 |
--------------------------------------------------------------------------------
/AUTHORS:
--------------------------------------------------------------------------------
1 | Dalmir da Silva
2 |
--------------------------------------------------------------------------------
/Camera/Camera.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Arduino - Camera interface
3 | *
4 | * Camera.cpp
5 | *
6 | * The abstract class for a Camera.
7 | *
8 | * @author Dalmir da Silva
9 | */
10 |
11 | #ifndef __ARDUINO_DRIVER_CAMERA_CPP__
12 | #define __ARDUINO_DRIVER_CAMERA_CPP__ 1
13 |
14 | #include "Camera.h"
15 |
16 | #endif /* __ARDUINO_DRIVER_CAMERA_CPP__ */
17 |
--------------------------------------------------------------------------------
/Camera/Camera.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Arduino - Camera interface
3 | *
4 | * Camera.h
5 | *
6 | * The abstract class for a Camera.
7 | *
8 | * @author Dalmir da Silva
9 | */
10 |
11 | #ifndef __ARDUINO_DRIVER_CAMERA_H__
12 | #define __ARDUINO_DRIVER_CAMERA_H__ 1
13 |
14 | class Camera {
15 | public:
16 |
17 | /**
18 | * Captures a frame.
19 | */
20 | virtual bool capture() = 0;
21 | };
22 |
23 | #endif /* __ARDUINO_DRIVER_CAMERA_H__ */
24 |
--------------------------------------------------------------------------------
/CameraAL422B/CameraAL422B.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Arduino - CameraAL422B implementation.
3 | *
4 | * CameraAL422B.cpp
5 | *
6 | * The class CameraAL422B.
7 | *
8 | * @author Dalmir da Silva
9 | */
10 |
11 | #ifndef __ARDUINO_DRIVER_CAMERA_AL422B_CPP__
12 | #define __ARDUINO_DRIVER_CAMERA_AL422B_CPP__ 1
13 |
14 | #include "CameraAL422B.h"
15 |
16 | CameraAL422B::CameraAL422B(unsigned char (*read)(), unsigned char vsyncPin,
17 | unsigned char writeEnPin, unsigned char readClockPin,
18 | unsigned char readResetPin) :
19 | Camera(), read(read) {
20 | this->vsyncPin = vsyncPin;
21 | this->writeEnPin = writeEnPin;
22 | this->readClockPin = readClockPin;
23 | this->readResetPin = readResetPin;
24 | address = 0x42;
25 | width = 640;
26 | height = 480;
27 | }
28 |
29 | void CameraAL422B::begin() {
30 | Wire.begin();
31 | pinMode(vsyncPin, INPUT);
32 | pinMode(writeEnPin, OUTPUT);
33 | pinMode(readClockPin, OUTPUT);
34 | pinMode(readResetPin, OUTPUT);
35 | resetRegisters();
36 | disableWrite();
37 | delayMicroseconds(100);
38 | }
39 |
40 | bool CameraAL422B::capture() {
41 | while (digitalReadFast(vsyncPin));
42 | while (!digitalReadFast(vsyncPin));
43 | enableWrite();
44 | while (digitalReadFast(vsyncPin));
45 | disableWrite();
46 | return true;
47 | }
48 |
49 | int CameraAL422B::readFrame(OutputStream *out) {
50 | int i, n = 0;
51 | resetReadPointer();
52 | for (i = 0; i < height; i++) {
53 | n += readRow(out);
54 | }
55 | return n;
56 | }
57 |
58 | int CameraAL422B::readRow(OutputStream *out) {
59 | int i;
60 | for (i = 0; i < width; i++) {
61 | digitalWriteHighFast(readClockPin);
62 | out->write(read());
63 | digitalWriteLowFast(readClockPin);
64 | }
65 | return i;
66 | }
67 |
68 | void CameraAL422B::setHorizontalMirror(bool mirror) {
69 | configureRegisterBits(MVFP, MVFP_MIRROR, (mirror) ? MVFP_MIRROR : 0x00);
70 | }
71 |
72 | void CameraAL422B::setVerticalFlip(bool flip) {
73 | configureRegisterBits(MVFP, MVFP_FLIP, (flip) ? MVFP_FLIP : 0x00);
74 | }
75 |
76 | void CameraAL422B::setFlashlightModeSelect(FlashlightModeSelect mode) {
77 | configureRegisterBits(STR_OPT, STR_OPT_MODE, (unsigned char) mode);
78 | }
79 |
80 | void CameraAL422B::setStrobeRequest(bool request) {
81 | configureRegisterBits(STR_OPT, STR_OPT_REQUEST,
82 | (request) ? STR_OPT_REQUEST : 0x00);
83 | }
84 |
85 | void CameraAL422B::setColorGainControlEnable(bool enable) {
86 | configureRegisterBits(STR_OPT, STR_OPT_GAIN,
87 | (enable) ? STR_OPT_GAIN : 0x00);
88 | }
89 |
90 | void CameraAL422B::resetRegisters() {
91 | configureRegisterBits(COM7, COM7_RESET, 0xff);
92 | }
93 |
94 | void CameraAL422B::setOutputFormat(OutputFormat format) {
95 | configureRegisterBits(COM7, COM7_FORMAT, (unsigned char) format);
96 | }
97 |
98 | void CameraAL422B::setOutputResolution(OutputResolution resolution) {
99 | configureRegisterBits(COM7, COM7_RESOLUTION, (unsigned char) resolution);
100 | switch (resolution) {
101 | case VGA:
102 | width = 640;
103 | height = 480;
104 | break;
105 | case QVGA:
106 | width = 320;
107 | height = 240;
108 | break;
109 | case CIF:
110 | width = 352;
111 | height = 288;
112 | break;
113 | case QCIF:
114 | width = 176;
115 | height = 144;
116 | break;
117 | }
118 | }
119 |
120 | void CameraAL422B::setRGBOutput(RGBOutput output) {
121 | configureRegisterBits(COM15, COM15_RGB, (unsigned char) output);
122 | }
123 |
124 | void CameraAL422B::enableWrite() {
125 | digitalWriteLowFast(writeEnPin);
126 | }
127 |
128 | void CameraAL422B::disableWrite() {
129 | digitalWriteHighFast(writeEnPin);
130 | }
131 |
132 | void CameraAL422B::resetReadPointer() {
133 | digitalWriteLowFast(readResetPin);
134 | delayMicroseconds(100);
135 | digitalWriteHighFast(readResetPin);
136 | }
137 |
138 | void CameraAL422B::configureRegisterBits(Register reg, Mask mask,
139 | unsigned char v) {
140 | unsigned char n;
141 | n = readRegister(reg);
142 | n &= ~((unsigned char) mask);
143 | n |= v & ((unsigned char) mask);
144 | writeRegister(reg, n);
145 | }
146 |
147 | void CameraAL422B::writeRegister(Register reg, unsigned char v) {
148 | Wire.beginTransmission(address);
149 | Wire.write((unsigned char) reg);
150 | Wire.write(v);
151 | Wire.endTransmission();
152 | }
153 |
154 | unsigned char CameraAL422B::readRegister(Register reg) {
155 | Wire.beginTransmission(address);
156 | Wire.write((unsigned char) reg);
157 | Wire.endTransmission(false);
158 | Wire.requestFrom(address, (unsigned char) 1);
159 | while (!Wire.available()) {
160 | delay(10);
161 | }
162 | return Wire.read();
163 | }
164 |
165 | #endif /* __ARDUINO_DRIVER_CAMERA_AL422B_CPP__ */
166 |
--------------------------------------------------------------------------------
/CameraAL422B/CameraAL422B.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Arduino - CameraAL422B implementation.
3 | *
4 | * CameraAL422B.h
5 | *
6 | * The class CameraAL422B.
7 | *
8 | * @author Dalmir da Silva
9 | */
10 |
11 | #ifndef __ARDUINO_DRIVER_CAMERA_AL422B_H__
12 | #define __ARDUINO_DRIVER_CAMERA_AL422B_H__ 1
13 |
14 | // Fast IO
15 | #define digitalWriteFast(pin, state) ((tate) == LOW) ? digitalWriteLowFast((pin)) : digitalWriteHighFast((pin))
16 | #define digitalWriteLowFast(pin) ((pin) < 8) ? PORTD &= ~(1 << (pin)) : ((pin) > 13) ? PORTC &= ~(1 << ((pin) - 14)) : PORTB &= ~(1 << ((pin) - 8))
17 | #define digitalWriteHighFast(pin) ((pin) < 8) ? PORTD |= (1 << (pin)) : ((pin) > 13) ? PORTC |= (1 << ((pin) - 14)) : PORTB |= (1 << ((pin) - 8))
18 | #define digitalReadFast(pin) ((pin) < 8) ? (PORTD & (1 << (pin))) : ((pin) > 13) ? (PORTC & (1 << ((pin) - 14))) : (PORTB & (1 << ((pin) - 8)))
19 |
20 | #include
21 | #include
22 | #include
23 | #include
24 |
25 | /*
26 | 1121 static unsigned char ov7670_sm_to_abs(unsigned char v)
27 | 1122 {
28 | 1123 if ((v & 0x80) == 0)
29 | 1124 return v + 128;
30 | 1125 return 128 - (v & 0x7f);
31 | 1126 }
32 | 1127
33 | 1128
34 | 1129 static unsigned char ov7670_abs_to_sm(unsigned char v)
35 | 1130 {
36 | 1131 if (v > 127)
37 | 1132 return v & 0x7f;
38 | 1133 return (128 - v) | 0x80;
39 | 1134 }*/
40 |
41 | class CameraAL422B : public Camera {
42 | private:
43 |
44 | unsigned char (*read)();
45 |
46 | unsigned char vsyncPin;
47 |
48 | unsigned char writeEnPin;
49 |
50 | unsigned char readClockPin;
51 |
52 | unsigned char readResetPin;
53 |
54 | unsigned char address;
55 |
56 | /**
57 | * Width in pixels.
58 | */
59 | int width;
60 |
61 | /**
62 | * Height in pixels.
63 | */
64 | int height;
65 |
66 | public:
67 |
68 | union MVFPbits {
69 |
70 | struct {
71 | unsigned char :2;
72 | unsigned char BLACK_SUN_EN :1;
73 | unsigned char :1;
74 | unsigned char VFLIP :1;
75 | unsigned char MIRROR :1;
76 | unsigned char :2;
77 | };
78 | unsigned char value;
79 | };
80 |
81 | enum Mask {
82 |
83 | // Flashlight Mode Select
84 | STR_OPT_MODE = 0x03,
85 |
86 | // Strobe Request
87 | STR_OPT_REQUEST = 0x80,
88 |
89 | // Color Gain Control Enable
90 | STR_OPT_GAIN = 0x40,
91 |
92 | // Horizontal mirror
93 | MVFP_MIRROR = 0x20,
94 |
95 | // Vertical flip
96 | MVFP_FLIP = 0x10,
97 |
98 | // Reset
99 | COM7_RESET = 0x80,
100 |
101 | // Output resolution.
102 | COM7_RESOLUTION = 0x38,
103 |
104 | // Output format.
105 | COM7_FORMAT = 0x05,
106 |
107 | // Color bar
108 | COM7_COLOR_BAR = 0x02,
109 |
110 | // Soft sleep mode
111 | COM2_SSLEEP = 0x10,
112 |
113 | // Separator
114 | _ = 0x00,
115 |
116 | // CCIR656 enable
117 | COM1_CCIR656 = 0x40,
118 |
119 | // Byte swap
120 | COM3_SWAP = 0x40,
121 |
122 | // Enable scaling
123 | COM3_SCALEEN = 0x08,
124 |
125 | // Enable downsamp/crop/window
126 | COM3_DCWEN = 0x04,
127 |
128 | // Use external clock directly
129 | CLKRC_EXT = 0x40,
130 |
131 | // Mask for internal clock scale
132 | CLKRC_SCALE = 0x3f,
133 |
134 | // Enable fast AGC/AEC
135 | COM8_FASTAEC = 0x80,
136 |
137 | // Unlimited AEC step size
138 | COM8_AECSTEP = 0x40,
139 |
140 | // Band filter enable
141 | COM8_BFILT = 0x20,
142 |
143 | // Auto gain enable
144 | COM8_AGC = 0x04,
145 |
146 | // White balance enable
147 | COM8_AWB = 0x02,
148 |
149 | // Auto exposure enable
150 | COM8_AEC = 0x01,
151 |
152 | // HSYNC instead of HREF
153 | COM10_HSYNC = 0x40,
154 |
155 | // Suppress PCLK on horiz blank
156 | COM10_PCLK_HB = 0x20,
157 |
158 | // Reverse HREF
159 | COM10_HREF_REV = 0x08,
160 |
161 | // VSYNC on clock leading edge
162 | COM10_VS_LEAD = 0x04,
163 |
164 | // VSYNC negative
165 | COM10_VS_NEG = 0x02,
166 |
167 | // HSYNC negative
168 | COM10_HS_NEG = 0x01,
169 |
170 | // UYVY or VYUY - see com13
171 | TSLB_YLAST = 0x04,
172 |
173 | // Night mode enable
174 | COM11_NIGHT = 0x80,
175 |
176 | // Two bit NM frame rate
177 | COM11_NMFR = 0x60,
178 |
179 | // Auto detect 50/60 Hz
180 | COM11_HZAUTO = 0x10,
181 |
182 | // Manual 50Hz select
183 | COM11_50HZ = 0x08,
184 |
185 | // Exp
186 | COM11_EXP = 0x02,
187 |
188 | // HREF always
189 | COM12_HREF = 0x80,
190 |
191 | // Gamma enable
192 | COM13_GAMMA = 0x80,
193 |
194 | // UV saturation auto adjustment
195 | COM13_UVSAT = 0x40,
196 |
197 | // V before U - w/TSLB
198 | COM13_UVSWAP = 0x01,
199 |
200 | // DCW/PCLK-scale enable
201 | COM14_DCWEN = 0x10,
202 |
203 | // Data range 10 to F0
204 | COM15_R10F0 = 0x00,
205 |
206 | // Data range 01 to FE
207 | COM15_R01FE = 0x80,
208 |
209 | // Data range 00 to FF
210 | COM15_R00FF = 0xc0,
211 |
212 | // RGB options
213 | COM15_RGB = 0x30,
214 |
215 | // AWB gain enable
216 | COM16_AWBGAIN = 0x08,
217 |
218 | // AEC window - must match COM4
219 | COM17_AECWIN = 0xc0,
220 |
221 | // DSP Color bar
222 | COM17_CBAR = 0x08,
223 |
224 | // White pixel correction enable
225 | R76_WHTPCOR = 0x40,
226 |
227 | // Black pixel correction enable
228 | REG76_BLKPCOR = 0x20,
229 |
230 | // Edge enhancement higher limit
231 | REG76_EDGE = 0x1f
232 | };
233 |
234 | enum Register {
235 |
236 | // Gain lower 8 bits (rest in vref)
237 | GAIN = 0x00,
238 |
239 | // blue gain
240 | BLUE = 0x01,
241 |
242 | // red gain
243 | RED = 0x02,
244 |
245 | // Pieces of GAIN, VSTART, VSTOP
246 | VREF = 0x03,
247 |
248 | // Control 1
249 | COM1 = 0x04,
250 |
251 | // U/B Average level
252 | BAVE = 0x05,
253 |
254 | // Y/Gb Average level
255 | GBAVE = 0x06,
256 |
257 | // AEC MS 5 bits
258 | AECHH = 0x07,
259 |
260 | // V/R Average level
261 | RAVE = 0x08,
262 |
263 | // Control 2
264 | COM2 = 0x09,
265 |
266 | // Product ID MSB
267 | PID = 0x0a,
268 |
269 | // Product ID LSB
270 | VER = 0x0b,
271 |
272 | // Control 3
273 | COM3 = 0x0c,
274 |
275 | // Control 4
276 | COM4 = 0x0d,
277 |
278 | // All "reserved"
279 | COM5 = 0x0e,
280 |
281 | // Control 6
282 | COM6 = 0x0f,
283 |
284 | // More bits of AEC value
285 | AECH = 0x10,
286 |
287 | // Clocl control
288 | CLKRC = 0x11,
289 |
290 | // Control 7
291 | COM7 = 0x12,
292 |
293 | // Control 8
294 | COM8 = 0x13,
295 |
296 | // Control 9 - gain ceiling
297 | COM9 = 0x14,
298 |
299 | // Control 10
300 | COM10 = 0x15,
301 |
302 | // Horiz start high bits
303 | HSTART = 0x17,
304 |
305 | // Horiz stop high bits
306 | HSTOP = 0x18,
307 |
308 | // Vert start high bits
309 | VSTART = 0x19,
310 |
311 | // Vert stop high bits
312 | VSTOP = 0x1a,
313 |
314 | // Pixel delay after HREF
315 | PSHFT = 0x1b,
316 |
317 | // Manuf. ID high
318 | MIDH = 0x1c,
319 |
320 | // Manuf. ID low
321 | MIDL = 0x1d,
322 |
323 | // Mirror / vflip
324 | MVFP = 0x1e,
325 |
326 | // AGC upper limit.
327 | AEW = 0x24,
328 |
329 | // AGC lower limit.
330 | AEB = 0x25,
331 |
332 | // AGC/AEC fast mode op region.
333 | VPT = 0x26,
334 |
335 | // B Channel Signal Output Bias (effective only when COM6[3] = 1).
336 | BBIAS = 0x27,
337 |
338 | // Gb Channel Signal Output Bias (effective only when COM6[3] = 1).
339 | GBBIAS = 0x28,
340 |
341 | // Dummy Pixel Insert MSB.
342 | EXHCH = 0x2a,
343 |
344 | // Dummy Pixel Insert LSB.
345 | EXHCL = 0x2b,
346 |
347 | // R Channel Signal Output Bias (effective only when COM6[3] = 1).
348 | RBIAS = 0x2c,
349 |
350 | // LSB of insert dummy rows in vertical direction (1 bit equals 1 row).
351 | ADVFL = 0x2d,
352 |
353 | // MSB of insert dummy rows in vertical direction.
354 | ADVFH = 0x2e,
355 |
356 | // Y/G Channel Average Value.
357 | YAVE = 0x2f,
358 |
359 | // HSYNC rising edge delay
360 | HSYST = 0x30,
361 |
362 | // HSYNC falling edge delay
363 | HSYEN = 0x31,
364 |
365 | // HREF pieces
366 | HREF = 0x32,
367 |
368 | // Array Current Control.
369 | CHLF = 0x33,
370 |
371 | // Array Reference Control.
372 | ARBLM = 0x34,
373 |
374 | // ADC Control.
375 | ADC_CONTROL = 0x37,
376 |
377 | // ADC and Analog Common Mode Control.
378 | ACOM = 0x38,
379 |
380 | // ADC Offset Control.
381 | OFON = 0x39,
382 |
383 | // Line Buffer Test Option.
384 | TSLB = 0x3a,
385 |
386 | // Control 11
387 | COM11 = 0x3b,
388 |
389 | // Control 12
390 | COM12 = 0x3c,
391 |
392 | // Control 13
393 | COM13 = 0x3d,
394 |
395 | // Control 14
396 | COM14 = 0x3e,
397 |
398 | // Edge enhancement factor
399 | EDGE = 0x3f,
400 |
401 | // Control 15
402 | COM15 = 0x40,
403 |
404 | // Control 16
405 | COM16 = 0x41,
406 |
407 | // Control 17
408 | COM17 = 0x42,
409 |
410 | // WB Control 1.
411 | AWBC1 = 0x43,
412 |
413 | // WB Control 2.
414 | AWBC2 = 0x44,
415 |
416 | // WB Control 3.
417 | AWBC3 = 0x45,
418 |
419 | // WB Control 4.
420 | AWBC4 = 0x46,
421 |
422 | // WB Control 5.
423 | AWBC5 = 0x47,
424 |
425 | // WB Control 6.
426 | AWBC6 = 0x48,
427 |
428 | // UV average.
429 | REG4B = 0x4b,
430 |
431 | // De-noise Strength.
432 | DNSTH = 0x4c,
433 |
434 | // Dummy row position.
435 | DM_POS = 0x4d,
436 |
437 | // Matrix Coefficient 1.
438 | MTX1 = 0x4f,
439 |
440 | // Matrix Coefficient 2.
441 | MTX2 = 0x50,
442 |
443 | // Matrix Coefficient 3.
444 | MTX3 = 0x51,
445 |
446 | // Matrix Coefficient 4.
447 | MTX4 = 0x52,
448 |
449 | // Matrix Coefficient 5.
450 | MTX5 = 0x53,
451 |
452 | // Matrix Coefficient 6.
453 | MTX6 = 0x54,
454 |
455 | // Brightness Control.
456 | BRIGHT = 0x55,
457 |
458 | // Contrast Control.
459 | CONTRAS = 0x56,
460 |
461 | // Contrast Center.
462 | CONTRAS_CENTER = 0x57,
463 |
464 | // Matrix Coefficient Sign for coefficient 5 to 0.
465 | MTXS = 0x58,
466 |
467 | // AWB Control 7.
468 | AWBC7 = 0x59,
469 |
470 | // AWB Control 8.
471 | AWBC8 = 0x5a,
472 |
473 | // AWB Control 9.
474 | AWBC9 = 0x5b,
475 |
476 | // AWB Control 10.
477 | AWBC10 = 0x5c,
478 |
479 | // AWB Control 11.
480 | AWBC11 = 0x5d,
481 |
482 | // AWB Control 12.
483 | AWBC12 = 0x5e,
484 |
485 | // AWB B Gain Range.
486 | B_LMT = 0x5f,
487 |
488 | // AWB R Gain Range.
489 | R_LMT = 0x60,
490 |
491 | // AWB G Gain Range.
492 | G_LMT = 0x61,
493 |
494 | // Lens Correction Option 1 - X Coordinate of Lens Correction Center Relative to Array Center.
495 | LCC1 = 0x62,
496 |
497 | // Lens Correction Option 2 - Y Coordinate of Lens Correction Center Relative to Array Center.
498 | LCC2 = 0x63,
499 |
500 | // Lens Correction Option 3
501 | LCC3 = 0x64,
502 |
503 | // Lens Correction Option 4 - Radius of the circular section where no compensation applies.
504 | LCC4 = 0x65,
505 |
506 | // Lens Correction Control.
507 | LCC5 = 0x66,
508 |
509 | // Manual U Value (effective only when register TSLB[4] is high).
510 | MANU = 0x67,
511 |
512 | // Manual V Value (effective only when register TSLB[4] is high).
513 | MANV = 0x68,
514 |
515 | // Fix gain control
516 | GFIX = 0x69,
517 |
518 | // G Channel AWB Gain.
519 | GGAIN = 0x6a,
520 |
521 | // PLL Control.
522 | DBLV = 0x6b,
523 |
524 | // AWB Control 3.
525 | AWBCTR3 = 0x6c,
526 |
527 | // AWB Control 2.
528 | AWBCTR2 = 0x6d,
529 |
530 | // AWB Control 1.
531 | AWBCTR1 = 0x6e,
532 |
533 | // AWB Control 0.
534 | AWBCTR0 = 0x6f,
535 |
536 | // Test_pattern[0] - works with test_pattern[1] test_pattern.
537 | SCALING_XSC = 0x70,
538 |
539 | // Test_pattern[1] - works with test_pattern[0] test_pattern (SCALING_XSC[7], SCALING_YSC[7]).
540 | SCALING_YSC = 0x71,
541 |
542 | // DCW Control
543 | SCALING_DCWCTR = 0x72,
544 |
545 | // Clock.
546 | SCALING_PCLK_DIV = 0x73,
547 |
548 | // Gain control.
549 | REG74 = 0x74,
550 |
551 | // Edge enhancement.
552 | REG75 = 0x75,
553 |
554 | // Pixel correction.
555 | REG76 = 0x76,
556 |
557 | // Offset, de-noise range control.
558 | REG77 = 0x77,
559 |
560 | // Gamma Curve Highest Segment Slop.
561 | SLOP = 0x7a,
562 |
563 | // Gamma Curve 1st Segment Input End Point 0x04 Output Value.
564 | GAM1 = 0x7b,
565 |
566 | // Gamma Curve 2nd Segment Input End Point 0x08 Output Value.
567 | GAM2 = 0x7c,
568 |
569 | // Gamma Curve 3rd Segment Input End Point 0x10 Output Value.
570 | GAM3 = 0x7d,
571 |
572 | // Gamma Curve 4th Segment Input End Point 0x20 Output Value.
573 | GAM4 = 0x7e,
574 |
575 | // Gamma Curve 5th Segment Input End Point 0x28 Output Value.
576 | GAM5 = 0x7f,
577 |
578 | // Gamma Curve 6th Segment Input End Point 0x30 Output Value.
579 | GAM6 = 0x80,
580 |
581 | // Gamma Curve 7th Segment Input End Point 0x38 Output Value.
582 | GAM7 = 0x81,
583 |
584 | // Gamma Curve 8th Segment Input End Point 0x40 Output Value.
585 | GAM8 = 0x82,
586 |
587 | // Gamma Curve 9th Segment Input End Point 0x48 Output Value.
588 | GAM9 = 0x83,
589 |
590 | // Gamma Curve 10th Segment Input End Point 0x50 Output Value.
591 | GAM10 = 0x84,
592 |
593 | // Gamma Curve 11th Segment Input End Point 0x60 Output Value.
594 | GAM11 = 0x85,
595 |
596 | // Gamma Curve 12th Segment Input End Point 0x70 Output Value.
597 | GAM12 = 0x86,
598 |
599 | // Gamma Curve 13th Segment Input End Point 0x90 Output Value.
600 | GAM13 = 0x87,
601 |
602 | // Gamma Curve 14th Segment Input End Point 0xB0 Output Value.
603 | GAM14 = 0x88,
604 |
605 | // Gamma Curve 15th Segment Input End Point 0xD0 Output Value.
606 | GAM15 = 0x89,
607 |
608 | // RGB 444 control
609 | // RGB444 = 0x8c,
610 |
611 | // Dummy Row low 8 bits.
612 | DM_LNL = 0x92,
613 |
614 | // Dummy Row high 8 bits.
615 | DM_LNH = 0x93,
616 |
617 | // Lens Correction Option 6 (effective only when LCC5[2] is high).
618 | LCC6 = 0x94,
619 |
620 | // Lens Correction Option 7 (effective only when LCC5[2] is high).
621 | LCC7 = 0x95,
622 |
623 | // 50 Hz Banding Filter Value (effective only when COM8[5] is high and COM11[3] is high).
624 | BD50ST = 0x9d,
625 |
626 | // 60 Hz Banding Filter Value (effective only when COM8[5] is high and COM11[3] is low).
627 | BD60ST = 0x9e,
628 |
629 | // High Reference Luminance.
630 | HRL = 0x9f,
631 |
632 | // Low Reference Luminance.
633 | LRL = 0xa0,
634 |
635 | // DSP Control 3.
636 | DSPC3 = 0xa1,
637 |
638 | // DSP Control 3.
639 | SCALING_PCLK_DELAY = 0xa2,
640 |
641 | // Frame rate adjustment.
642 | NT_CTRL = 0xa4,
643 |
644 | // Maximum Banding Filter Step.
645 | AECGMAX = 0xa5,
646 |
647 | // Lower Limit of Probability for HRL, after exposure/gain stabilizes.
648 | LPH = 0xa6,
649 |
650 | // Upper Limit of Probability for LRL, after exposure/gain stabilizes.
651 | UPL = 0xa7,
652 |
653 | // Probability Threshold for LRL to control AEC/AGC speed.
654 | TPL = 0xa8,
655 |
656 | // Probability Threshold for HRL to control AEC/AGC speed.
657 | TPH = 0xa9,
658 |
659 | // AEC algorithm selection.
660 | NALG = 0xaa,
661 |
662 | // Strobe
663 | STR_OPT = 0xac,
664 |
665 | // Red gain for strobe.
666 | STR_R = 0xad,
667 |
668 | // Green gain for strobe.
669 | STR_G = 0xae,
670 |
671 | // Blue gain for strobe.
672 | STR_B = 0xaf,
673 |
674 | // ABLC function.
675 | ABLC1 = 0xb1,
676 |
677 | // ABLC Target.
678 | THL_ST = 0xb3,
679 |
680 | // ABLC Stable Range.
681 | THL_DLT = 0xb5,
682 |
683 | // Blue Channel Black Level Compensation.
684 | AD_CHB = 0xbe,
685 |
686 | // Red Channel Black Level Compensation.
687 | AD_CHR = 0xbf,
688 |
689 | // Gb Channel Black Level Compensation.
690 | AD_CHGB = 0xc0
691 | };
692 |
693 | enum FlashlightModeSelect {
694 | XENON = 0x00, LED1 = 0x01, LED2 = 0x02
695 | };
696 |
697 | enum OutputFormat {
698 |
699 | // YUV format
700 | YUV = 0x00,
701 |
702 | // RGB format
703 | RGB = 0x04,
704 |
705 | // Raw bayer RGB format
706 | RAW_BAYER_RGB = 0x01,
707 |
708 | // Processed bayer RGB format
709 | PROCESSED_BAYER_RGB = 0x05
710 | };
711 |
712 | enum OutputResolution {
713 |
714 | // VGA format.
715 | VGA = 0x00,
716 |
717 | // CIF format
718 | CIF = 0x20,
719 |
720 | // QVGA format
721 | QVGA = 0x10,
722 |
723 | // QCIF format
724 | QCIF = 0x08
725 | };
726 |
727 | enum RGBOutput {
728 |
729 | // Normal RGB
730 | RGB_NORMAL = 0x00,
731 |
732 | // RGB 565
733 | RGB_565 = 0x10,
734 |
735 | // RGB 555
736 | RGB_555 = 0x30
737 | };
738 |
739 | /**
740 | * Public constructor.
741 | *
742 | * @param read The reader function.
743 | * @param vsyncPin The vertical sync pin number.
744 | * @param hsyncPin The horizontal sync pin number.
745 | * @param pclkPin The clock pin number.
746 | *
747 | */
748 | CameraAL422B(unsigned char (*read)(), unsigned char vsyncPin,
749 | unsigned char writeEnPin, unsigned char readClockPin,
750 | unsigned char readResetPin);
751 |
752 | /**
753 | * Initializes the camera.
754 | */
755 | void begin();
756 |
757 | /**
758 | * Captures a frame.
759 | */
760 | virtual bool capture();
761 |
762 | /**
763 | * Returns a frame.
764 | *
765 | * @return A frame.
766 | */
767 | int readFrame(OutputStream *out);
768 |
769 | /**
770 | * En/disable horizontal mirror.
771 | *
772 | * @param mirror The mirror option.
773 | */
774 | void inline setHorizontalMirror(bool mirror);
775 |
776 | /**
777 | * En/disable vertical flip.
778 | *
779 | * @param mirror The vertical flip.
780 | */
781 | void inline setVerticalFlip(bool flip);
782 |
783 | /**
784 | * Select the flashlight mode.
785 | *
786 | * @param mode The FlashlightModeSelect to be used.
787 | */
788 | void inline setFlashlightModeSelect(FlashlightModeSelect mode);
789 |
790 | /**
791 | * Exit/Enter strobe mode.
792 | *
793 | * @param request Enter or exit.
794 | */
795 | void inline setStrobeRequest(bool request);
796 |
797 | /**
798 | * Enable/Disable color gain.
799 | *
800 | * @param enable Enable or disable.
801 | */
802 | void inline setColorGainControlEnable(bool enable);
803 |
804 | /**
805 | * Sets the output format.
806 | *
807 | * @param format The output format.
808 | */
809 | void setOutputFormat(OutputFormat format);
810 |
811 | /**
812 | * Sets predefined output resolution.
813 | *
814 | * @param resolution The output resolution.
815 | */
816 | void setOutputResolution(OutputResolution resolution);
817 |
818 | /**
819 | * Sets the RGB output.
820 | *
821 | * @param output The RGB output.
822 | */
823 | void setRGBOutput(RGBOutput output);
824 |
825 | /**
826 | * Enables write to the FIFO.
827 | */
828 | void inline enableWrite();
829 |
830 | /**
831 | * Disables write to the FIFO.
832 | */
833 | void inline disableWrite();
834 |
835 | /**
836 | * Resets the FIFO internal read pointer.
837 | */
838 | void inline resetReadPointer();
839 |
840 | /**
841 | * Configures a registers inside the camera.
842 | *
843 | * @param reg The register number.
844 | * @param mask The mask to be used.
845 | * @param v The value to be used.
846 | */
847 | void configureRegisterBits(Register reg, Mask mask, unsigned char v);
848 |
849 | /**
850 | * Writes a value to a register.
851 | *
852 | * @param reg The register number.
853 | * @param v The value to be used.
854 | */
855 | void writeRegister(Register reg, unsigned char v);
856 |
857 | /**
858 | * Reades a value from a register.
859 | *
860 | * @param reg The register number.
861 | * @return The register value.
862 | */
863 | unsigned char readRegister(Register reg);
864 |
865 | private:
866 |
867 | /**
868 | * Resets all register to default value.
869 | */
870 | void inline resetRegisters();
871 |
872 | /**
873 | * Reads a row.
874 | *
875 | * @param out The output stream to be read into.
876 | */
877 | int readRow(OutputStream *out);
878 | };
879 |
880 | #endif /* __ARDUINO_DRIVER_CAMERA_AL422B_H__ */
881 |
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/3M-Bit Frame Buffer.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraAL422B/datasheet/3M-Bit Frame Buffer.pdf
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7670 + AL422B(FIFO) Camera Module(V2.0) Schematic.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraAL422B/datasheet/OV7670 + AL422B(FIFO) Camera Module(V2.0) Schematic.pdf
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7670 Implementation Guide (V1.0).pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraAL422B/datasheet/OV7670 Implementation Guide (V1.0).pdf
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7670_CMOS.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraAL422B/datasheet/OV7670_CMOS.pdf
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/Arduino/libraries/DigitalWriteFast/DigitalWriteFast.h:
--------------------------------------------------------------------------------
1 | #ifndef DIGITALWRITEFAST_H
2 | #define DIGITALWRITEFAST
3 |
4 | #include
5 |
6 | #define BIT_READ(value, bit) (((value) >> (bit)) & 0x01)
7 | #define BIT_SET(value, bit) ((value) |= (1UL << (bit)))
8 | #define BIT_CLEAR(value, bit) ((value) &= ~(1UL << (bit)))
9 | #define BIT_WRITE(value, bit, bitvalue) (bitvalue ? BIT_SET(value, bit) : BIT_CLEAR(value, bit))
10 |
11 | #if !defined(digitalPinToPortReg)
12 | #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
13 | // Arduino Mega Pins
14 | #define digitalPinToPortReg(P) \
15 | (((P) >= 22 && (P) <= 29) ? &PORTA : \
16 | ((((P) >= 10 && (P) <= 13) || ((P) >= 50 && (P) <= 53)) ? &PORTB : \
17 | (((P) >= 30 && (P) <= 37) ? &PORTC : \
18 | ((((P) >= 18 && (P) <= 21) || (P) == 38) ? &PORTD : \
19 | ((((P) >= 0 && (P) <= 3) || (P) == 5) ? &PORTE : \
20 | (((P) >= 54 && (P) <= 61) ? &PORTF : \
21 | ((((P) >= 39 && (P) <= 41) || (P) == 4) ? &PORTG : \
22 | ((((P) >= 6 && (P) <= 9) || (P) == 16 || (P) == 17) ? &PORTH : \
23 | (((P) == 14 || (P) == 15) ? &PORTJ : \
24 | (((P) >= 62 && (P) <= 69) ? &PORTK : &PORTL))))))))))
25 |
26 | #define digitalPinToDDRReg(P) \
27 | (((P) >= 22 && (P) <= 29) ? &DDRA : \
28 | ((((P) >= 10 && (P) <= 13) || ((P) >= 50 && (P) <= 53)) ? &DDRB : \
29 | (((P) >= 30 && (P) <= 37) ? &DDRC : \
30 | ((((P) >= 18 && (P) <= 21) || (P) == 38) ? &DDRD : \
31 | ((((P) >= 0 && (P) <= 3) || (P) == 5) ? &DDRE : \
32 | (((P) >= 54 && (P) <= 61) ? &DDRF : \
33 | ((((P) >= 39 && (P) <= 41) || (P) == 4) ? &DDRG : \
34 | ((((P) >= 6 && (P) <= 9) || (P) == 16 || (P) == 17) ? &DDRH : \
35 | (((P) == 14 || (P) == 15) ? &DDRJ : \
36 | (((P) >= 62 && (P) <= 69) ? &DDRK : &DDRL))))))))))
37 |
38 | #define digitalPinToPINReg(P) \
39 | (((P) >= 22 && (P) <= 29) ? &PINA : \
40 | ((((P) >= 10 && (P) <= 13) || ((P) >= 50 && (P) <= 53)) ? &PINB : \
41 | (((P) >= 30 && (P) <= 37) ? &PINC : \
42 | ((((P) >= 18 && (P) <= 21) || (P) == 38) ? &PIND : \
43 | ((((P) >= 0 && (P) <= 3) || (P) == 5) ? &PINE : \
44 | (((P) >= 54 && (P) <= 61) ? &PINF : \
45 | ((((P) >= 39 && (P) <= 41) || (P) == 4) ? &PING : \
46 | ((((P) >= 6 && (P) <= 9) || (P) == 16 || (P) == 17) ? &PINH : \
47 | (((P) == 14 || (P) == 15) ? &PINJ : \
48 | (((P) >= 62 && (P) <= 69) ? &PINK : &PINL))))))))))
49 |
50 | #define __digitalPinToBit(P) \
51 | (((P) >= 7 && (P) <= 9) ? (P) - 3 : \
52 | (((P) >= 10 && (P) <= 13) ? (P) - 6 : \
53 | (((P) >= 22 && (P) <= 29) ? (P) - 22 : \
54 | (((P) >= 30 && (P) <= 37) ? 37 - (P) : \
55 | (((P) >= 39 && (P) <= 41) ? 41 - (P) : \
56 | (((P) >= 42 && (P) <= 49) ? 49 - (P) : \
57 | (((P) >= 50 && (P) <= 53) ? 53 - (P) : \
58 | (((P) >= 54 && (P) <= 61) ? (P) - 54 : \
59 | (((P) >= 62 && (P) <= 69) ? (P) - 62 : \
60 | (((P) == 0 || (P) == 15 || (P) == 17 || (P) == 21) ? 0 : \
61 | (((P) == 1 || (P) == 14 || (P) == 16 || (P) == 20) ? 1 : \
62 | (((P) == 19) ? 2 : \
63 | (((P) == 5 || (P) == 6 || (P) == 18) ? 3 : \
64 | (((P) == 2) ? 4 : \
65 | (((P) == 3 || (P) == 4) ? 5 : 7)))))))))))))))
66 |
67 | // 15 PWM
68 | #define __digitalPinToTimer(P) \
69 | (((P) == 13 || (P) == 4) ? &TCCR0A : \
70 | (((P) == 11 || (P) == 12) ? &TCCR1A : \
71 | (((P) == 10 || (P) == 9) ? &TCCR2A : \
72 | (((P) == 5 || (P) == 2 || (P) == 3) ? &TCCR3A : \
73 | (((P) == 6 || (P) == 7 || (P) == 8) ? &TCCR4A : \
74 | (((P) == 46 || (P) == 45 || (P) == 44) ? &TCCR5A : 0))))))
75 | #define __digitalPinToTimerBit(P) \
76 | (((P) == 13) ? COM0A1 : (((P) == 4) ? COM0B1 : \
77 | (((P) == 11) ? COM1A1 : (((P) == 12) ? COM1B1 : \
78 | (((P) == 10) ? COM2A1 : (((P) == 9) ? COM2B1 : \
79 | (((P) == 5) ? COM3A1 : (((P) == 2) ? COM3B1 : (((P) == 3) ? COM3C1 : \
80 | (((P) == 6) ? COM4A1 : (((P) == 7) ? COM4B1 : (((P) == 8) ? COM4C1 : \
81 | (((P) == 46) ? COM5A1 : (((P) == 45) ? COM5B1 : COM5C1))))))))))))))
82 |
83 | #else
84 |
85 | // Standard Arduino Pins
86 | #define digitalPinToPortReg(P) \
87 | (((P) >= 0 && (P) <= 7) ? &PORTD : (((P) >= 8 && (P) <= 13) ? &PORTB : &PORTC))
88 | #define digitalPinToDDRReg(P) \
89 | (((P) >= 0 && (P) <= 7) ? &DDRD : (((P) >= 8 && (P) <= 13) ? &DDRB : &DDRC))
90 | #define digitalPinToPINReg(P) \
91 | (((P) >= 0 && (P) <= 7) ? &PIND : (((P) >= 8 && (P) <= 13) ? &PINB : &PINC))
92 | #define __digitalPinToBit(P) \
93 | (((P) >= 0 && (P) <= 7) ? (P) : (((P) >= 8 && (P) <= 13) ? (P) - 8 : (P) - 14))
94 |
95 | #if defined(__AVR_ATmega8__)
96 | // 3 PWM
97 | #define __digitalPinToTimer(P) \
98 | (((P) == 9 || (P) == 10) ? &TCCR1A : (((P) == 11) ? &TCCR2 : 0))
99 | #define __digitalPinToTimerBit(P) \
100 | (((P) == 9) ? COM1A1 : (((P) == 10) ? COM1B1 : COM21))
101 | #else //168,328
102 |
103 | // 6 PWM
104 | #define __digitalPinToTimer(P) \
105 | (((P) == 6 || (P) == 5) ? &TCCR0A : \
106 | (((P) == 9 || (P) == 10) ? &TCCR1A : \
107 | (((P) == 11 || (P) == 3) ? &TCCR2A : 0)))
108 | #define __digitalPinToTimerBit(P) \
109 | (((P) == 6) ? COM0A1 : (((P) == 5) ? COM0B1 : \
110 | (((P) == 9) ? COM1A1 : (((P) == 10) ? COM1B1 : \
111 | (((P) == 11) ? COM2A1 : COM2B1)))))
112 | #endif //defined(__AVR_ATmega8__)
113 |
114 |
115 | #endif //mega
116 | #endif //#if !defined(digitalPinToPortReg)
117 |
118 |
119 |
120 |
121 | #define __atomicWrite__(A,P,V) \
122 | if ( (int)(A) < 0x40) { bitWrite(*(A), __digitalPinToBit(P), (V) );} \
123 | else { \
124 | uint8_t register saveSreg = SREG; \
125 | cli(); \
126 | bitWrite(*(A), __digitalPinToBit(P), (V) ); \
127 | SREG=saveSreg; \
128 | }
129 |
130 |
131 | #ifndef digitalWriteFast
132 | #define digitalWriteFast(P, V) \
133 | do { \
134 | if (__builtin_constant_p(P) && __builtin_constant_p(V)) __atomicWrite__((uint8_t*) digitalPinToPortReg(P),P,V) \
135 | else digitalWrite((P), (V)); \
136 | }while (0)
137 | #endif //#ifndef digitalWriteFast2
138 |
139 | #if !defined(pinModeFast)
140 | #define pinModeFast(P, V) \
141 | do {if (__builtin_constant_p(P) && __builtin_constant_p(V)) __atomicWrite__((uint8_t*) digitalPinToDDRReg(P),P,V) \
142 | else pinMode((P), (V)); \
143 | } while (0)
144 | #endif
145 |
146 |
147 | #ifndef noAnalogWrite
148 | #define noAnalogWrite(P) \
149 | do {if (__builtin_constant_p(P) ) __atomicWrite((uint8_t*) __digitalPinToTimer(P),P,0) \
150 | else turnOffPWM((P)); \
151 | } while (0)
152 | #endif
153 |
154 |
155 | #ifndef digitalReadFast
156 | #define digitalReadFast(P) ( (int) _digitalReadFast_((P)) )
157 | #define _digitalReadFast_(P ) \
158 | (__builtin_constant_p(P) ) ? ( \
159 | ( BIT_READ(*digitalPinToPINReg(P), __digitalPinToBit(P))) ) : \
160 | digitalRead((P))
161 | #endif
162 |
163 | #endif
164 |
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/Arduino/libraries/DigitalWriteFast/Readme.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/Arduino/libraries/DigitalWriteFast/Readme.pdf
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/Arduino/libraries/DigitalWriteFast/keywords.txt:
--------------------------------------------------------------------------------
1 | #######################################
2 | # Syntax Coloring Map For DigitalWriteFast
3 | #######################################
4 |
5 | #######################################
6 | # Datatypes (KEYWORD1)
7 | #######################################
8 |
9 | DigitalWriteFast KEYWORD1
10 |
11 | #######################################
12 | # Methods and Functions (KEYWORD2)
13 | #######################################
14 |
15 | digitalWriteFast KEYWORD2
16 | pinModeFast KEYWORD2
17 | digitalReadFast KEYWORD2
18 | noAnalogWrite KEYWORD2
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/Arduino/libraries/MIN_at_Camera/MIN_at_Camera.cpp:
--------------------------------------------------------------------------------
1 | // ArduinoCam Version 1.0 (2012-09-01) Firmware (Duemilanove Atmega168)
2 | // Copyright 2012 richard.prinz@min.at
3 | // See http://www.min.at/prinz/oe1rib/ArduinoCam/ for more infos
4 | //
5 | // This file is part of ArduinoCam
6 | //
7 | // ArduinoCam is free software and hardware design:
8 | // you can redistribute the software and the hardware design and/or modify it under
9 | // the terms of the GNU General Public License as published by the Free Software Foundation,
10 | // either version 3 of the License, or (at your option) any later version.
11 | //
12 | // ArduinoCam is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13 | // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 | // See the GNU General Public License for more details.
15 | //
16 | // You should have received a copy of the GNU General Public License along with ArduinoCam.
17 | // If not, see http://www.gnu.org/licenses/.
18 |
19 | #include "MIN_at_Camera.h"
20 |
21 |
22 |
23 | // OV7620 Arduino camera shield
24 |
25 |
26 |
27 | // Constructors ////////////////////////////////////////////////////////////////
28 |
29 | Camera::Camera()
30 | {
31 | }
32 |
33 |
34 |
35 | // Public Methods //////////////////////////////////////////////////////////////
36 |
37 | void Camera::Begin()
38 | {
39 | Begin(OV_7620_ADDR);
40 | }
41 |
42 | void Camera::Begin(byte address)
43 | {
44 | Begin((int)address);
45 | }
46 |
47 | void Camera::Begin(int address)
48 | {
49 | _addr = address;
50 |
51 | DDRD = B00000000;
52 | DDRC = B00000000;
53 |
54 | pinModeFast(BUS_RRST, OUTPUT);
55 | pinModeFast(BUS_RCK, OUTPUT);
56 |
57 | digitalWriteFast(BUS_RRST, HIGH);
58 | digitalWriteFast(BUS_RCK, LOW);
59 | }
60 |
61 | bool Camera::Reset()
62 | {
63 | byte b = 0;
64 |
65 | // (0x12) initiate camera reset
66 | Tools::I2C_WriteValue(_addr, OV_COMMON_A, I2C_SHORT_ADDR, 0x80, 300);
67 |
68 | // try to read manufacturer id 0x7FA2 from camera
69 | Tools::I2C_Write(_addr, OV_ID_H, I2C_SHORT_ADDR);
70 | Wire.requestFrom(_addr, 2);
71 |
72 | if(Wire.available())
73 | {
74 | b = Wire.read();
75 | if(b != 0x7F)
76 | return false;
77 | }
78 | else
79 | return false;
80 |
81 | if(Wire.available())
82 | {
83 | b = Wire.read();
84 | if(b != 0xA2)
85 | return false;
86 | }
87 | else
88 | return false;
89 |
90 | return true;
91 | }
92 |
93 | void Camera::Init()
94 | {
95 | ResetVideoPointer();
96 |
97 | // (0x11) HSYNC-neg, CHSYNC-neg, VSYNC-pos
98 | //Tools::I2C_WriteValue(_addr, OV_CLOCK_RATE, I2C_SHORT_ADDR, 0x00, 10);
99 |
100 | // (0x12) Mirror image, auto white balance, AGC
101 | //Tools::I2C_WriteValue(_addr, OV_COMMON_A, I2C_SHORT_ADDR, 0x64, 10);
102 |
103 | // (0x13) set 8bit mode, enable bus, auto adjust
104 | Tools::I2C_WriteValue(_addr, OV_COMMON_B, I2C_SHORT_ADDR, 0x21, 10);
105 |
106 |
107 | // (0x14) set 640 x 480 VGA mode
108 | Tools::I2C_WriteValue(_addr, OV_COMMON_C, I2C_SHORT_ADDR, 0x04, 10);
109 | // (0x14) set 320 x 240 QVGA mode
110 | //Tools::I2C_WriteValue(_addr, OV_COMMON_C, I2C_SHORT_ADDR, 0x24, 10);
111 |
112 |
113 | // (0x15) set UYVY for 8 bit output
114 | Tools::I2C_WriteValue(_addr, OV_COMMON_D, I2C_SHORT_ADDR, 0x01, 10);
115 |
116 | // (0x16) field mode selection off
117 | Tools::I2C_WriteValue(_addr, OV_FRAME_DROP, I2C_SHORT_ADDR, 0x00, 10);
118 |
119 | // (0x27) set SRAM control
120 | Tools::I2C_WriteValue(_addr, OV_COMMON_G, I2C_SHORT_ADDR, 0xE3, 10);
121 |
122 |
123 | // (0x28) set interlaced scan mode
124 | Tools::I2C_WriteValue(_addr, OV_COMMON_H, I2C_SHORT_ADDR, 0x00, 10);
125 | // (0x28) set progressive scan mode
126 | //Tools::I2C_WriteValue(_addr, OV_COMMON_H, I2C_SHORT_ADDR, 0x20, 10);
127 |
128 |
129 | // (0x67) set color space
130 | // 0x1A = YUV, 0x5A = Analog YUV, 0x9A = CCIR 601 YCrCb
131 | // 0xDA = PAL YUV
132 | //Tools::I2C_WriteValue(_addr, OV_COLOR_SPACE, I2C_SHORT_ADDR, 0x1A, 10);
133 | }
134 |
135 | void Camera::ColorBar(bool Value)
136 | {
137 | Tools::I2C_SetBitAt(_addr, OV_COMMON_A, I2C_SHORT_ADDR, 1, Value, 0);
138 | }
139 |
140 | void Camera::Power(bool Value)
141 | {
142 | Tools::I2C_SetBitAt(_addr, OV_COMMON_O, I2C_SHORT_ADDR, 5, Value, 0);
143 | }
144 |
145 | void Camera::Mirror(bool Value)
146 | {
147 | Tools::I2C_SetBitAt(_addr, OV_COMMON_A, I2C_SHORT_ADDR, 6, Value, 0);
148 | }
149 |
150 | bool Camera::Capture()
151 | {
152 | byte b = 0;
153 | bool status = false;
154 | int i = 0;
155 |
156 | // (0x14) set 320 x 240 QVGA mode
157 | Tools::I2C_WriteValue(_addr, OV_COMMON_C, I2C_SHORT_ADDR, 0x24, 10);
158 |
159 | // (0x28) set progressive scan mode
160 | Tools::I2C_WriteValue(_addr, OV_COMMON_H, I2C_SHORT_ADDR, 0x20, 10);
161 |
162 | // start single frame transfer
163 | Tools::I2C_WriteValue(_addr, OV_COMMON_B, I2C_SHORT_ADDR, 0x23, 100);
164 |
165 | again:
166 | i++;
167 | delay(5);
168 |
169 | b = Cam.ReadConfigByte(OV_COMMON_B);
170 | if( (b & 0x02) == 0x00 )
171 | {
172 | status = true;
173 | i = 11;
174 | }
175 |
176 | if(i < 10)
177 | goto again;
178 |
179 |
180 | // (0x14) set 640 x 480 VGA mode
181 | Tools::I2C_WriteValue(_addr, OV_COMMON_C, I2C_SHORT_ADDR, 0x04, 10);
182 |
183 | // (0x28) set interlaced scan mode
184 | Tools::I2C_WriteValue(_addr, OV_COMMON_H, I2C_SHORT_ADDR, 0x00, 10);
185 |
186 | return status;
187 | }
188 |
189 | void Camera::Dump(bool Hex)
190 | {
191 | byte cntr = 0;
192 | byte b = 0;
193 |
194 | ResetVideoPointer();
195 |
196 | for(int lc = 0; lc < 240; lc++)
197 | {
198 | for(int pc = 0; pc < 640; pc++)
199 | {
200 | // read U/V, Y
201 | b = ReadNextVideoByte();
202 |
203 | if(Hex)
204 | DumpVideoByte(b, &(++cntr));
205 | else
206 | Serial.write(b);
207 | }
208 | }
209 |
210 | digitalWriteFast(BUS_RCK, LOW);
211 | Serial.println();
212 | }
213 |
214 | void Camera::DumpConfig()
215 | {
216 | byte b = 0;
217 |
218 | // (0x11) HSYNC-neg, CHSYNC-neg, VSYNC-pos
219 | Serial.print("OV_CLOCK_RATE (0x11: 0x00): ");
220 | b = Cam.ReadConfigByte(OV_CLOCK_RATE);
221 | Camera::DebugPrintValue(b);
222 |
223 | // (0x12) mirror image, testpattern, reset
224 | Serial.print("OV_COMMON_A (0x12: 0x64): ");
225 | b = Cam.ReadConfigByte(OV_COMMON_A);
226 | Camera::DebugPrintValue(b);
227 |
228 | // (0x13) set 8bit mode, enable bus, auto adjust
229 | Serial.print("OV_COMMON_B (0x13: 0x21): ");
230 | b = Cam.ReadConfigByte(OV_COMMON_B);
231 | Camera::DebugPrintValue(b);
232 |
233 | // (0x14) set 320 x 240 QVGA mode
234 | Serial.print("OV_COMMON_C (0x14: 0x24): ");
235 | b = Cam.ReadConfigByte(OV_COMMON_C);
236 | Camera::DebugPrintValue(b);
237 |
238 | // (0x16) field mode selection off
239 | Serial.print("OV_FRAME_DROP (0x16: 0x00): ");
240 | b = Cam.ReadConfigByte(OV_FRAME_DROP);
241 | Camera::DebugPrintValue(b);
242 |
243 | // (0x27) set SRAM control
244 | Serial.print("OV_COMMON_G (0x27: 0xE3): ");
245 | b = Cam.ReadConfigByte(OV_COMMON_G);
246 | Camera::DebugPrintValue(b);
247 |
248 | // (0x28) set progressive scan mode
249 | Serial.print("OV_COMMON_H (0x28: 0x20): ");
250 | b = Cam.ReadConfigByte(OV_COMMON_H);
251 | Camera::DebugPrintValue(b);
252 |
253 | // (0x67) color space selection
254 | Serial.print("OV_COLOR_SPACE(0x67: 0x1A): ");
255 | b = Cam.ReadConfigByte(OV_COLOR_SPACE);
256 | Camera::DebugPrintValue(b);
257 |
258 | // (0x71) set progressive scan mode
259 | Serial.print("OV_COMMON_L (0x71: 0x00): ");
260 | b = Cam.ReadConfigByte(OV_COMMON_L);
261 | Camera::DebugPrintValue(b);
262 | }
263 |
264 | byte Camera::ReadConfigByte(byte MemAddr)
265 | {
266 | byte b = 0;
267 |
268 | Tools::I2C_ReadByteDefault(_addr, MemAddr, I2C_SHORT_ADDR, &b, 0);
269 |
270 | return b;
271 | }
272 |
273 | uint8_t Camera::ReadNextVideoByte()
274 | {
275 | // read clock
276 |
277 | digitalWriteFast(BUS_RCK, LOW);
278 | delayMicroseconds(20);
279 |
280 | digitalWriteFast(BUS_RCK, HIGH);
281 | delayMicroseconds(20);
282 |
283 | return (PIND & B11111100) | (PINC & B00000011);
284 | }
285 |
286 | void Camera::DumpVideoByte(byte VideoByte, byte *count)
287 | {
288 | Serial.print(Tools::FormatHEX(VideoByte, 0));
289 |
290 | if(*count == 16)
291 | {
292 | *count = 0;
293 | Serial.println();
294 | }
295 | else
296 | Serial.print(" ");
297 | }
298 |
299 | void Camera::ResetVideoPointer()
300 | {
301 | // reset sram read/write pointer
302 | digitalWriteFast(BUS_RRST, LOW);
303 | delay(1);
304 |
305 | // read clock
306 | digitalWriteFast(BUS_RCK, LOW);
307 | delay(1);
308 | digitalWriteFast(BUS_RCK, HIGH);
309 | delay(1);
310 | digitalWriteFast(BUS_RCK, LOW);
311 | delay(1);
312 | digitalWriteFast(BUS_RCK, HIGH);
313 | delay(1);
314 |
315 | digitalWriteFast(BUS_RRST, HIGH);
316 | }
317 |
318 | void Camera::DebugPrintValue(byte Value)
319 | {
320 | Serial.print(Tools::FormatHEX(Value, 1));
321 | Serial.print(" ");
322 | Serial.print(Tools::FormatBIN(Value));
323 | Serial.println();
324 | }
325 |
326 | void Camera::UYV2RGB(byte U, byte Y, byte V, byte *R, byte *G, byte *B)
327 | {
328 | float Yx = 1.164 * (Y - 16.0);
329 | float Ux = U - 128.0;
330 | float Vx = V - 128.0;
331 |
332 | *R = Clip(Yx + 1.596 * Ux);
333 | *G = Clip(Yx - 0.813 * Ux - 0.392 * Vx);
334 | *B = Clip(Yx + 2.017 * Vx);
335 | }
336 |
337 |
338 |
339 | // Private Methods //////////////////////////////////////////////////////////////
340 |
341 | uint8_t Camera::Clip(float Value)
342 | {
343 | float v = round(Value);
344 |
345 | if(v < 0)
346 | return 0;
347 |
348 | if(v > 255)
349 | return 255;
350 |
351 | return (byte)Value;
352 | }
353 |
354 |
355 |
356 | // Preinstantiate Objects //////////////////////////////////////////////////////
357 |
358 | Camera Cam = Camera();
359 |
360 |
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/Arduino/libraries/MIN_at_Camera/MIN_at_Camera.h:
--------------------------------------------------------------------------------
1 | // ArduinoCam Version 1.0 (2012-09-01) Firmware (Duemilanove Atmega168)
2 | // Copyright 2012 richard.prinz@min.at
3 | // See http://www.min.at/prinz/oe1rib/ArduinoCam/ for more infos
4 | //
5 | // This file is part of ArduinoCam
6 | //
7 | // ArduinoCam is free software and hardware design:
8 | // you can redistribute the software and the hardware design and/or modify it under
9 | // the terms of the GNU General Public License as published by the Free Software Foundation,
10 | // either version 3 of the License, or (at your option) any later version.
11 | //
12 | // ArduinoCam is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13 | // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 | // See the GNU General Public License for more details.
15 | //
16 | // You should have received a copy of the GNU General Public License along with ArduinoCam.
17 | // If not, see http://www.gnu.org/licenses/.
18 |
19 | #ifndef MIN_at_Camera_h
20 | #define MIN_at_Camera_h
21 |
22 | #include
23 | #include
24 | #include "MIN_at_Tools.h"
25 |
26 |
27 | #define OV_7620_ADDR 0x21
28 |
29 | #define OV_AGC 0x00
30 | #define OV_BLUE_GAIN 0x01
31 | #define OV_RED_GAIN 0x02
32 | #define OV_SATURATION 0x03
33 |
34 | #define OV_BRIGHTNESS 0x06
35 | #define OV_ANALOG_SHARPNESS 0x07
36 |
37 | #define OV_WBAL_BLUE 0x0C
38 | #define OV_WBAL_RED 0x0D
39 |
40 | #define OV_AUTO_EXPOSURE 0x10
41 | #define OV_CLOCK_RATE 0x11
42 | #define OV_COMMON_A 0x12
43 | #define OV_COMMON_B 0x13
44 | #define OV_COMMON_C 0x14
45 | #define OV_COMMON_D 0x15
46 | #define OV_FRAME_DROP 0x16
47 | #define OV_HWIN_START 0x17
48 | #define OV_HWIN_END 0x18
49 | #define OV_VWIN_START 0x19
50 | #define OV_VWIN_END 0x1A
51 | #define OV_PIXEL_SHIFT 0x1B
52 | #define OV_ID_H 0x1C
53 | #define OV_ID_L 0x1D
54 |
55 | #define OV_COMMON_E 0x20
56 | #define OV_YCHAN_OFFSET 0x21
57 | #define OV_UCHAN_OFFSET 0x22
58 | #define OV_CRYSTAL_CURRENT 0x23
59 | #define OV_AEW_PIXEL_RATIO 0x24
60 | #define OV_AEB_PIXEL_RATIO 0x25
61 | #define OV_COMMON_F 0x26
62 | #define OV_COMMON_G 0x27
63 | #define OV_COMMON_H 0x28
64 | #define OV_COMMON_I 0x29
65 | #define OV_FRAME_RATE_1 0x2A
66 | #define OV_FRAME_RATE_2 0x2B
67 | #define OV_BLACK_EXPAND 0x2C
68 | #define OV_COMMON_J 0x2D
69 | #define OV_VCHAN_OFFSET 0x2E
70 |
71 | #define OV_SIGNAL_A 0x60
72 | #define OV_SIGNAL_B 0x61
73 | #define OV_RGB_GAMMA 0x62
74 |
75 | #define OV_Y_GAMMA 0x64
76 | #define OV_SIGNAL_C 0x65
77 | #define OV_AWB_CONTROL 0x66
78 | #define OV_COLOR_SPACE 0x67
79 | #define OV_SIGNAL_D 0x68
80 | #define OV_HEDGE_ENH 0x69
81 | #define OV_VEDGE_ENH 0x6A
82 |
83 | #define OV_E_O_NOISE 0x6F
84 | #define OV_COMMON_K 0x70
85 | #define OV_COMMON_L 0x71
86 | #define OV_HSYNC_EDGE_1 0x72
87 | #define OV_HSYNC_EDGE_2 0x73
88 | #define OV_COMMON_M 0x74
89 | #define OV_COMMON_N 0x75
90 | #define OV_COMMON_O 0x76
91 |
92 | #define OV_FIELD_AVG 0x7C
93 |
94 | /*
95 | #define BUS_0 0x02
96 | #define BUS_1 0x03
97 | #define BUS_2 0x02
98 | #define BUS_3 0x03
99 | #define BUS_4 0x04
100 | #define BUS_5 0x05
101 | #define BUS_6 0x06
102 | #define BUS_7 0x07
103 | */
104 |
105 | #define BUS_RRST 0x08
106 | #define BUS_RCK 0x09
107 |
108 | class Camera
109 | {
110 | private:
111 | int _addr;
112 |
113 | static uint8_t Clip(float Value);
114 |
115 |
116 | public:
117 | Camera();
118 |
119 | void Begin();
120 | void Begin(uint8_t address);
121 | void Begin(int address);
122 |
123 | bool Reset();
124 |
125 | void Init();
126 | void ColorBar(bool On);
127 | void Power(bool On);
128 | void Mirror(bool On);
129 | bool Capture();
130 | void Dump(bool Hex);
131 | void DumpConfig();
132 |
133 | uint8_t ReadConfigByte(uint8_t MemAddr);
134 | uint8_t ReadNextVideoByte();
135 | void DumpVideoByte(uint8_t pixel, uint8_t *count);
136 | void ResetVideoPointer();
137 |
138 | static void DebugPrintValue(uint8_t Value);
139 | static void UYV2RGB(uint8_t U, uint8_t Y, uint8_t V, uint8_t *R, uint8_t *G, uint8_t *B);
140 | };
141 |
142 | extern Camera Cam;
143 |
144 | #endif
145 |
146 |
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/Arduino/libraries/MIN_at_DS1307/MIN_at_DS1307.cpp:
--------------------------------------------------------------------------------
1 | // ArduinoCam Version 1.0 (2012-09-01) Firmware (Duemilanove Atmega168)
2 | // Copyright 2012 richard.prinz@min.at
3 | // See http://www.min.at/prinz/oe1rib/ArduinoCam/ for more infos
4 | //
5 | // This file is part of ArduinoCam
6 | //
7 | // ArduinoCam is free software and hardware design:
8 | // you can redistribute the software and the hardware design and/or modify it under
9 | // the terms of the GNU General Public License as published by the Free Software Foundation,
10 | // either version 3 of the License, or (at your option) any later version.
11 | //
12 | // ArduinoCam is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13 | // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 | // See the GNU General Public License for more details.
15 | //
16 | // You should have received a copy of the GNU General Public License along with ArduinoCam.
17 | // If not, see http://www.gnu.org/licenses/.
18 |
19 | #include "MIN_at_DS1307.h"
20 |
21 |
22 |
23 | // Microchip DS1307 RTC
24 |
25 |
26 |
27 | // Constructors ////////////////////////////////////////////////////////////////
28 |
29 | DS1307::DS1307()
30 | {
31 | }
32 |
33 |
34 |
35 | // Public Methods //////////////////////////////////////////////////////////////
36 |
37 | void DS1307::Begin()
38 | {
39 | Begin(DS1307_ADDR);
40 | }
41 |
42 | void DS1307::Begin(byte address)
43 | {
44 | Begin((int)address);
45 | }
46 |
47 | void DS1307::Begin(int address)
48 | {
49 | _addr = address;
50 | }
51 |
52 | void DS1307::Reset()
53 | {
54 | Wire.beginTransmission(_addr);
55 | for(int i = 0; i < 8; i++)
56 | Wire.write((uint8_t)0x00);
57 | Wire.endTransmission();
58 | }
59 |
60 | uint8_t DS1307::ReadConfigByte()
61 | {
62 | uint8_t temp;
63 | Tools::I2C_ReadByteDefault(_addr, DS1307_CONFIG, I2C_SHORT_ADDR, &temp, 0x00);
64 | return temp;
65 | }
66 |
67 | void DS1307::WriteConfigByte(uint8_t Value)
68 | {
69 | Tools::I2C_WriteValue(_addr, DS1307_CONFIG, I2C_SHORT_ADDR, Value, 10);
70 | }
71 |
72 | bool DS1307::ReadTime()
73 | {
74 | uint8_t i = 0;
75 |
76 | Tools::I2C_Write(_addr, 0x00, I2C_SHORT_ADDR);
77 | Wire.requestFrom(_addr, 7);
78 |
79 | if(Wire.available())
80 | {
81 | _rtc_sec = Tools::bcdToDec(Wire.read() & 0x7f);
82 | i++;
83 | }
84 |
85 | if(Wire.available())
86 | {
87 | _rtc_min = Tools::bcdToDec(Wire.read());
88 | i++;
89 | }
90 |
91 | if(Wire.available())
92 | {
93 | _rtc_hour = Tools::bcdToDec(Wire.read() & 0x3f);
94 | i++;
95 | }
96 |
97 | if(Wire.available())
98 | {
99 | _rtc_wday = Tools::bcdToDec(Wire.read());
100 | i++;
101 | }
102 |
103 | if(Wire.available())
104 | {
105 | _rtc_day = Tools::bcdToDec(Wire.read());
106 | i++;
107 | }
108 |
109 | if(Wire.available())
110 | {
111 | _rtc_mon = Tools::bcdToDec(Wire.read());
112 | i++;
113 | }
114 |
115 | if(Wire.available())
116 | {
117 | _rtc_year = Tools::bcdToDec(Wire.read());
118 | i++;
119 | }
120 |
121 | return i == 7;
122 | }
123 |
124 | void DS1307::WriteTime()
125 | {
126 | uint8_t a[] = {_rtc_sec, _rtc_min, _rtc_hour,
127 | _rtc_wday, _rtc_day, _rtc_mon, _rtc_year};
128 | WriteTimeArray(a);
129 | }
130 |
131 | void DS1307::WriteTimeArray(uint8_t Array[])
132 | {
133 | Wire.beginTransmission(_addr);
134 | Wire.write((uint8_t)0x00);
135 | for(int i = 0; i < 7; i++)
136 | Wire.write(Array[i]);
137 | Wire.endTransmission();
138 | }
139 |
140 |
141 |
142 | // Private Methods /////////////////////////////////////////////////////////////
143 |
144 |
145 |
146 | // Preinstantiate Objects //////////////////////////////////////////////////////
147 |
148 | DS1307 DS1307x = DS1307();
149 |
150 |
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/Arduino/libraries/MIN_at_DS1307/MIN_at_DS1307.h:
--------------------------------------------------------------------------------
1 | // ArduinoCam Version 1.0 (2012-09-01) Firmware (Duemilanove Atmega168)
2 | // Copyright 2012 richard.prinz@min.at
3 | // See http://www.min.at/prinz/oe1rib/ArduinoCam/ for more infos
4 | //
5 | // This file is part of ArduinoCam
6 | //
7 | // ArduinoCam is free software and hardware design:
8 | // you can redistribute the software and the hardware design and/or modify it under
9 | // the terms of the GNU General Public License as published by the Free Software Foundation,
10 | // either version 3 of the License, or (at your option) any later version.
11 | //
12 | // ArduinoCam is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13 | // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 | // See the GNU General Public License for more details.
15 | //
16 | // You should have received a copy of the GNU General Public License along with ArduinoCam.
17 | // If not, see http://www.gnu.org/licenses/.
18 |
19 | #ifndef MIN_at_DS1307_h
20 | #define MIN_at_DS1307_h
21 |
22 | #include
23 | #include
24 | #include "MIN_at_Tools.h"
25 |
26 |
27 | #define DS1307_ADDR 0x68
28 |
29 | #define DS1307_SECONDS 0x00
30 | #define DS1307_MINUTES 0x01
31 | #define DS1307_HOURS 0x02
32 | #define DS1307_DAY 0x03
33 | #define DS1307_DATE 0x04
34 | #define DS1307_MONTH 0x05
35 | #define DS1307_YEAR 0x06
36 | #define DS1307_CONFIG 0x07
37 |
38 | class DS1307
39 | {
40 | private:
41 | int _addr;
42 |
43 |
44 | public:
45 | uint8_t _rtc_sec;
46 | uint8_t _rtc_min;
47 | uint8_t _rtc_hour;
48 | uint8_t _rtc_wday;
49 | uint8_t _rtc_day;
50 | uint8_t _rtc_mon;
51 | uint8_t _rtc_year;
52 |
53 | DS1307();
54 |
55 | void Begin();
56 | void Begin(uint8_t address);
57 | void Begin(int address);
58 |
59 | void Reset();
60 | uint8_t ReadConfigByte();
61 | void WriteConfigByte(uint8_t value);
62 | bool ReadTime();
63 | void WriteTime();
64 | void WriteTimeArray(uint8_t Array[]);
65 | };
66 |
67 | extern DS1307 DS1307x;
68 |
69 | #endif
70 |
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/Arduino/libraries/MIN_at_TC74/MIN_at_TC74.cpp:
--------------------------------------------------------------------------------
1 | // ArduinoCam Version 1.0 (2012-09-01) Firmware (Duemilanove Atmega168)
2 | // Copyright 2012 richard.prinz@min.at
3 | // See http://www.min.at/prinz/oe1rib/ArduinoCam/ for more infos
4 | //
5 | // This file is part of ArduinoCam
6 | //
7 | // ArduinoCam is free software and hardware design:
8 | // you can redistribute the software and the hardware design and/or modify it under
9 | // the terms of the GNU General Public License as published by the Free Software Foundation,
10 | // either version 3 of the License, or (at your option) any later version.
11 | //
12 | // ArduinoCam is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13 | // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 | // See the GNU General Public License for more details.
15 | //
16 | // You should have received a copy of the GNU General Public License along with ArduinoCam.
17 | // If not, see http://www.gnu.org/licenses/.
18 |
19 | #include "MIN_at_TC74.h"
20 |
21 |
22 |
23 | // Microchip TC74 I2C Sensor library
24 |
25 |
26 |
27 | // Constructors ////////////////////////////////////////////////////////////////
28 |
29 | TC74::TC74()
30 | {
31 | }
32 |
33 |
34 |
35 | // Public Methods //////////////////////////////////////////////////////////////
36 |
37 | void TC74::Begin()
38 | {
39 | Begin(TC74A0_ADDR);
40 | }
41 |
42 | void TC74::Begin(byte address)
43 | {
44 | Begin((int)address);
45 | }
46 |
47 | void TC74::Begin(int address)
48 | {
49 | _addr = address;
50 | }
51 |
52 | void TC74::Standby(bool Value)
53 | {
54 | uint8_t w = (Value ? 0x80 : 0x00);
55 | WriteConfigByte(w);
56 | }
57 |
58 | uint8_t TC74::ReadConfigByte()
59 | {
60 | uint8_t temp;
61 | Tools::I2C_ReadByteDefault(_addr, TC74_CONFIG, I2C_SHORT_ADDR, &temp, 0x00);
62 | return temp;
63 | }
64 |
65 | void TC74::WriteConfigByte(uint8_t Value)
66 | {
67 | Tools::I2C_WriteValue(_addr, TC74_CONFIG, I2C_SHORT_ADDR, Value, 0);
68 | }
69 |
70 | int8_t TC74::ReadTemperature()
71 | {
72 | uint8_t temp;
73 | Tools::I2C_ReadByteDefault(_addr, TC74_TEMP, I2C_SHORT_ADDR, &temp, TC74_VALUE_ERROR);
74 | return (int8_t)temp;
75 | }
76 |
77 |
78 |
79 | // Private Methods //////////////////////////////////////////////////////////////
80 |
81 |
82 |
83 | // Preinstantiate Objects //////////////////////////////////////////////////////
84 |
85 |
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/Arduino/libraries/MIN_at_TC74/MIN_at_TC74.h:
--------------------------------------------------------------------------------
1 | // ArduinoCam Version 1.0 (2012-09-01) Firmware (Duemilanove Atmega168)
2 | // Copyright 2012 richard.prinz@min.at
3 | // See http://www.min.at/prinz/oe1rib/ArduinoCam/ for more infos
4 | //
5 | // This file is part of ArduinoCam
6 | //
7 | // ArduinoCam is free software and hardware design:
8 | // you can redistribute the software and the hardware design and/or modify it under
9 | // the terms of the GNU General Public License as published by the Free Software Foundation,
10 | // either version 3 of the License, or (at your option) any later version.
11 | //
12 | // ArduinoCam is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13 | // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 | // See the GNU General Public License for more details.
15 | //
16 | // You should have received a copy of the GNU General Public License along with ArduinoCam.
17 | // If not, see http://www.gnu.org/licenses/.
18 |
19 | #ifndef MIN_at_TC74_h
20 | #define MIN_at_TC74_h
21 |
22 | #include
23 | #include
24 | #include "MIN_at_Tools.h"
25 |
26 |
27 | #define TC74A0_ADDR 0x48
28 | #define TC74A1_ADDR 0x49
29 | #define TC74A2_ADDR 0x4A
30 | #define TC74A3_ADDR 0x4B
31 | #define TC74A4_ADDR 0x4C
32 | #define TC74A5_ADDR 0x4D
33 | #define TC74A6_ADDR 0x4E
34 | #define TC74A7_ADDR 0x4F
35 |
36 | #define TC74_TEMP 0x00
37 | #define TC74_CONFIG 0x01
38 | #define TC74_VALUE_ERROR 0x80
39 |
40 |
41 | class TC74
42 | {
43 | private:
44 | int _addr;
45 |
46 |
47 | public:
48 | TC74();
49 |
50 | void Begin();
51 | void Begin(uint8_t address);
52 | void Begin(int address);
53 |
54 | void Standby(bool Value);
55 |
56 | uint8_t ReadConfigByte();
57 | void WriteConfigByte(uint8_t value);
58 | int8_t ReadTemperature();
59 | };
60 |
61 | #endif
62 |
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/Arduino/libraries/MIN_at_Tools/MIN_at_Tools.cpp:
--------------------------------------------------------------------------------
1 | // ArduinoCam Version 1.0 (2012-09-01) Firmware (Duemilanove Atmega168)
2 | // Copyright 2012 richard.prinz@min.at
3 | // See http://www.min.at/prinz/oe1rib/ArduinoCam/ for more infos
4 | //
5 | // This file is part of ArduinoCam
6 | //
7 | // ArduinoCam is free software and hardware design:
8 | // you can redistribute the software and the hardware design and/or modify it under
9 | // the terms of the GNU General Public License as published by the Free Software Foundation,
10 | // either version 3 of the License, or (at your option) any later version.
11 | //
12 | // ArduinoCam is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13 | // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 | // See the GNU General Public License for more details.
15 | //
16 | // You should have received a copy of the GNU General Public License along with ArduinoCam.
17 | // If not, see http://www.gnu.org/licenses/.
18 |
19 | #include "MIN_at_Tools.h"
20 |
21 |
22 |
23 | // Constructors ////////////////////////////////////////////////////////////////
24 |
25 | Tools::Tools()
26 | {
27 | }
28 |
29 |
30 |
31 | // Public Methods //////////////////////////////////////////////////////////////
32 |
33 | int Tools::ReadDec(uint8_t MaxLen, uint8_t Flags, bool *Valid)
34 | {
35 | int v = 0;
36 | uint8_t i = 0;
37 | uint8_t inByte;
38 |
39 | *Valid = true;
40 |
41 | while(true)
42 | {
43 | if(Serial.available() > 0)
44 | {
45 | inByte = Serial.read();
46 |
47 | // ESC = cancel
48 | if(inByte == 0x1B)
49 | {
50 | *Valid = false;
51 | break;
52 | }
53 |
54 | // handle backspace
55 | if(inByte == CHAR_BACKSPACE)
56 | {
57 | if(i <= 0)
58 | Serial.write(CHAR_BELL);
59 | else
60 | {
61 | v = v / 10;
62 | i--;
63 | if( (Flags & DI_ECHO) == DI_ECHO )
64 | Serial.print("\010 \010");
65 | }
66 | continue;
67 | }
68 |
69 | // CR & LF submits input
70 | if( (inByte == CHAR_CR || inByte == CHAR_LF) && (Flags & DI_ALLOW_CR) == DI_ALLOW_CR )
71 | break;
72 |
73 | // if maximum allowed input length reached
74 | if(i >= MaxLen)
75 | {
76 | Serial.write(CHAR_BELL);
77 | continue;
78 | }
79 |
80 | // only digits 0 - 9 allowed
81 | if(inByte >= '0' && inByte <= '9')
82 | {
83 | if( (Flags & DI_ECHO) == DI_ECHO )
84 | Serial.write(inByte);
85 |
86 | v = (v * 10) + (inByte - '0');
87 | i++;
88 | if(i >= MaxLen && (Flags & DI_AUTO_SKIP) == DI_AUTO_SKIP)
89 | break;
90 | }
91 | else
92 | Serial.write(CHAR_BELL);
93 | }
94 | }
95 |
96 | return v;
97 | }
98 |
99 | char *Tools::FormatHEX(uint8_t Value, uint8_t Prefix)
100 | {
101 | static char strOut[5];
102 | snprintf(strOut, sizeof(strOut), "%s%02X", (Prefix > 0 ? "0x" : ""), Value);
103 | return strOut;
104 | }
105 |
106 | char *Tools::FormatHEX16(int Value, uint8_t Prefix)
107 | {
108 | static char strOut[7];
109 | snprintf(strOut, sizeof(strOut), "%s%04X", (Prefix > 0 ? "0x" : ""), Value);
110 | return strOut;
111 | }
112 |
113 | char *Tools::FormatBIN(uint8_t Value)
114 | {
115 | static char buffer[9];
116 | for (int i = 0; i < 8; i++)
117 | buffer[7-i] = '0' + ((Value & (1 << i)) > 0);
118 | buffer[8] ='\0';
119 | return buffer;
120 | }
121 |
122 |
123 |
124 |
125 |
126 | void Tools::I2C_Write(uint8_t I2cAddr, uint16_t MemAddr, uint8_t UseLongAddr)
127 | {
128 | Wire.beginTransmission(I2cAddr);
129 | if(UseLongAddr > 0)
130 | {
131 | Wire.write(MemAddr >> 8); // MSB
132 | Wire.write(MemAddr & 0xFF); // LSB
133 | }
134 | else
135 | Wire.write(MemAddr & 0x00FF);
136 | Wire.endTransmission();
137 | }
138 |
139 | void Tools::I2C_WriteValue(uint8_t I2cAddr, uint16_t MemAddr, uint8_t UseLongAddr,
140 | uint8_t Value, int Delay)
141 | {
142 | Wire.beginTransmission(I2cAddr);
143 | if(UseLongAddr > 0)
144 | {
145 | Wire.write(MemAddr >> 8); // MSB
146 | Wire.write(MemAddr & 0xFF); // LSB
147 | }
148 | else
149 | Wire.write(MemAddr & 0x00FF);
150 | Wire.write(Value);
151 | Wire.endTransmission();
152 | if(Delay > 0)
153 | delay(Delay);
154 | }
155 |
156 | bool Tools::I2C_ReadByte(uint8_t I2cAddr, uint16_t MemAddr, uint8_t UseLongAddr,
157 | uint8_t *Value)
158 | {
159 | I2C_Write(I2cAddr, MemAddr, UseLongAddr);
160 | Wire.requestFrom((int)I2cAddr, 1);
161 |
162 | if(Wire.available())
163 | {
164 | *Value = Wire.read();
165 | return true;
166 | }
167 | else
168 | return false;
169 | }
170 |
171 | bool Tools::I2C_ReadByteDefault(uint8_t I2cAddr, uint16_t MemAddr, uint8_t UseLongAddr,
172 | uint8_t *Value, uint8_t DefaultValue)
173 | {
174 | if(!Tools::I2C_ReadByte(I2cAddr, MemAddr, UseLongAddr, Value))
175 | {
176 | *Value = DefaultValue;
177 | return true;
178 | }
179 |
180 | return false;
181 | }
182 |
183 | void Tools::I2C_SetBitAt(uint8_t I2cAddr, uint16_t MemAddr, uint8_t UseLongAddr,
184 | uint8_t BitNum, bool Value, int Delay)
185 | {
186 | uint8_t m = 1 << BitNum;
187 | uint8_t b;
188 | if(!I2C_ReadByte(I2cAddr, MemAddr, UseLongAddr, &b))
189 | return;
190 |
191 | if(!Value)
192 | {
193 | m = ~m;
194 | b = b & m;
195 | }
196 | else
197 | b = b | m;
198 |
199 | I2C_WriteValue(I2cAddr, MemAddr, UseLongAddr, b, Delay);
200 | }
201 |
202 | // WARNING: address is a page address, 6-bit end will wrap around
203 | // also, data can be maximum of about 30 bytes, because the Wire
204 | // library has a buffer of 32 bytes
205 | void Tools::I2C_EEWriteBuffer(uint8_t I2cAddr, uint16_t MemAddr,
206 | byte *Data, byte Length)
207 | {
208 | Wire.beginTransmission(I2cAddr);
209 | Wire.write(MemAddr >> 8); // MSB
210 | Wire.write(MemAddr & 0x00FF); // LSB
211 | byte c;
212 | for (c = 0; c < Length; c++)
213 | Wire.write(Data[c]);
214 | Wire.endTransmission();
215 | }
216 |
217 | // maybe let's not read more than 30 or 32 bytes at a time!
218 | void Tools::I2C_EEReadBuffer(uint8_t I2cAddr, uint16_t MemAddr, byte *Data, int Length)
219 | {
220 | Wire.beginTransmission(I2cAddr);
221 | Wire.write(MemAddr >> 8); // MSB
222 | Wire.write(MemAddr & 0xFF); // LSB
223 | Wire.endTransmission();
224 | Wire.requestFrom((int)I2cAddr, Length);
225 | int c = 0;
226 | for (c = 0; c < Length; c++)
227 | if (Wire.available())
228 | Data[c] = Wire.read();
229 | }
230 |
231 | // Convert binary coded decimal to normal decimal numbers
232 | uint8_t Tools::bcdToDec(uint8_t Value)
233 | {
234 | return ( (Value / 16 * 10) + (Value % 16) );
235 | }
236 |
237 | // Convert Decimal to Binary Coded Decimal (BCD)
238 | uint8_t Tools::dec2bcd(uint8_t num)
239 | {
240 | return ( (num / 10 * 16) + (num % 10) );
241 | }
242 |
243 |
244 |
245 | // Private Methods //////////////////////////////////////////////////////////////
246 |
247 |
248 |
249 | // Preinstantiate Objects //////////////////////////////////////////////////////
250 |
251 |
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/Arduino/libraries/MIN_at_Tools/MIN_at_Tools.h:
--------------------------------------------------------------------------------
1 | // ArduinoCam Version 1.0 (2012-09-01) Firmware (Duemilanove Atmega168)
2 | // Copyright 2012 richard.prinz@min.at
3 | // See http://www.min.at/prinz/oe1rib/ArduinoCam/ for more infos
4 | //
5 | // This file is part of ArduinoCam
6 | //
7 | // ArduinoCam is free software and hardware design:
8 | // you can redistribute the software and the hardware design and/or modify it under
9 | // the terms of the GNU General Public License as published by the Free Software Foundation,
10 | // either version 3 of the License, or (at your option) any later version.
11 | //
12 | // ArduinoCam is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13 | // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 | // See the GNU General Public License for more details.
15 | //
16 | // You should have received a copy of the GNU General Public License along with ArduinoCam.
17 | // If not, see http://www.gnu.org/licenses/.
18 |
19 | #ifndef Tools_h
20 | #define Tools_h
21 |
22 | #include
23 | #include
24 | #include
25 | #include "../Wire/Wire.h"
26 | #include "../DigitalWriteFast/DigitalWriteFast.h"
27 |
28 | #define CHAR_BACKSPACE 0x08
29 | #define CHAR_BELL 0x07
30 | #define CHAR_CR 0x0D
31 | #define CHAR_LF 0x0A
32 |
33 | #define I2C_SHORT_ADDR 0
34 | #define I2C_LONG_ADDR 1
35 |
36 | #define DI_ALLOW_CR 1
37 | #define DI_ECHO 2
38 | #define DI_AUTO_SKIP 4
39 |
40 |
41 | class Tools
42 | {
43 | public:
44 | Tools();
45 |
46 | static int ReadDec(uint8_t MaxLen, uint8_t Flags, bool *Valid);
47 |
48 | static char *FormatHEX(uint8_t Value, uint8_t Prefix);
49 | static char *FormatHEX16(int Value, uint8_t Prefix);
50 | static char *FormatBIN(uint8_t Value);
51 |
52 | static void I2C_Write(uint8_t I2cAddr, uint16_t MemAddr, uint8_t UseLongAddr);
53 | static void I2C_WriteValue(uint8_t I2cAddr, uint16_t MemAddr, uint8_t UseLongAddr,
54 | uint8_t Value, int Delay);
55 |
56 | static bool I2C_ReadByte(uint8_t I2cAddr, uint16_t MemAddr, uint8_t UseLongAddr,
57 | uint8_t *Value);
58 | static bool I2C_ReadByteDefault(uint8_t I2cAddr, uint16_t MemAddr, uint8_t UseLongAddr,
59 | uint8_t *Value, uint8_t DefaultValue);
60 |
61 | static void I2C_SetBitAt(uint8_t I2cAddr, uint16_t MemAddr, uint8_t UseLongAddr,
62 | uint8_t BitNum, bool Value, int Delay);
63 |
64 | static void I2C_EEWriteBuffer(uint8_t I2cAddr, uint16_t MemAddr,
65 | byte *Data, byte Length);
66 | static void I2C_EEReadBuffer(uint8_t I2cAddr, uint16_t MemAddr,
67 | byte *Data, int Length);
68 |
69 |
70 | static uint8_t bcdToDec(uint8_t Value);
71 | static uint8_t dec2bcd(uint8_t num);
72 | };
73 |
74 | #endif
75 |
76 |
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/Arduino/sketchbook/ArduinoCam/Base64.ino:
--------------------------------------------------------------------------------
1 | // ArduinoCam Version 1.0 (2012-09-01) Firmware (Duemilanove Atmega168)
2 | // Copyright 2012 richard.prinz@min.at
3 | // See http://www.min.at/prinz/oe1rib/ArduinoCam/ for more infos
4 | //
5 | // This file is part of ArduinoCam
6 | //
7 | // ArduinoCam is free software and hardware design:
8 | // you can redistribute the software and the hardware design and/or modify it under
9 | // the terms of the GNU General Public License as published by the Free Software Foundation,
10 | // either version 3 of the License, or (at your option) any later version.
11 | //
12 | // ArduinoCam is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13 | // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 | // See the GNU General Public License for more details.
15 | //
16 | // You should have received a copy of the GNU General Public License along with ArduinoCam.
17 | // If not, see http://www.gnu.org/licenses/.
18 |
19 | // ***************************************************************************
20 | // Base 64 routines
21 | // ***************************************************************************
22 |
23 | inline void a3_to_a4(unsigned char *a4, unsigned char *a3);
24 |
25 | const char b64_alphabet[] =
26 | "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
27 | "abcdefghijklmnopqrstuvwxyz"
28 | "01234567890/+";
29 | unsigned long _byteCount;
30 | byte _byteMod;
31 | byte _outCount;
32 | unsigned char a3[3];
33 | unsigned char a4[4];
34 |
35 | void B64EncodeStart(char *Header)
36 | {
37 | _byteCount = 0;
38 | _byteMod = 0;
39 | _outCount = 0;
40 | B64ClearMem();
41 |
42 | if(Header != NULL)
43 | Serial.print(Header);
44 | }
45 |
46 | void B64EncodeNext(unsigned char value)
47 | {
48 | if(_byteMod == 0 && _byteCount > 0)
49 | {
50 | a3_to_a4(a4, a3);
51 | for(int i = 0; i < 4; i++)
52 | B64Out(b64_alphabet[a4[i]]);
53 | B64ClearMem();
54 | }
55 |
56 | a3[_byteMod] = value;
57 |
58 | _byteCount++;
59 | _byteMod = _byteCount % 3;
60 | }
61 |
62 | void B64EncodeDone(char *Header)
63 | {
64 | if(_byteMod == 0)
65 | if(_byteCount == 0)
66 | return;
67 | else
68 | _byteMod = 3;
69 |
70 | a3_to_a4(a4, a3);
71 |
72 | for(int i = 0; i < 4; i++)
73 | B64Out( (i <= _byteMod ? b64_alphabet[a4[i]] : '=') );
74 |
75 | if(Header != NULL)
76 | Serial.print(Header);
77 | }
78 |
79 | void B64Out(char Value)
80 | {
81 | Serial.write(Value);
82 | _outCount++;
83 | if(_outCount == 76)
84 | {
85 | Serial.println();
86 | _outCount = 0;
87 | }
88 | }
89 |
90 | void B64ClearMem()
91 | {
92 | a3[0] = 0;
93 | a3[1] = 0;
94 | a3[2] = 0;
95 | }
96 |
97 | inline void a3_to_a4(unsigned char *a4, unsigned char *a3)
98 | {
99 | a4[0] = (a3[0] & 0xfc) >> 2;
100 | a4[1] = ((a3[0] & 0x03) << 4) + ((a3[1] & 0xf0) >> 4);
101 | a4[2] = ((a3[1] & 0x0f) << 2) + ((a3[2] & 0xc0) >> 6);
102 | a4[3] = (a3[2] & 0x3f);
103 | }
104 |
105 |
106 |
107 |
108 |
109 |
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/Arduino/sketchbook/ArduinoCam/Bitmap.ino:
--------------------------------------------------------------------------------
1 | // ArduinoCam Version 1.0 (2012-09-01) Firmware (Duemilanove Atmega168)
2 | // Copyright 2012 richard.prinz@min.at
3 | // See http://www.min.at/prinz/oe1rib/ArduinoCam/ for more infos
4 | //
5 | // This file is part of ArduinoCam
6 | //
7 | // ArduinoCam is free software and hardware design:
8 | // you can redistribute the software and the hardware design and/or modify it under
9 | // the terms of the GNU General Public License as published by the Free Software Foundation,
10 | // either version 3 of the License, or (at your option) any later version.
11 | //
12 | // ArduinoCam is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13 | // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 | // See the GNU General Public License for more details.
15 | //
16 | // You should have received a copy of the GNU General Public License along with ArduinoCam.
17 | // If not, see http://www.gnu.org/licenses/.
18 |
19 | // ***************************************************************************
20 | // Bitmap routines
21 | // ***************************************************************************
22 |
23 | void DumpByte(byte Value)
24 | {
25 | if( IS_B64_ENCODED )
26 | B64EncodeNext(Value);
27 | else
28 | Serial.write(Value);
29 | }
30 |
31 | void DumpString(const char *Value)
32 | {
33 | byte b;
34 | while( (b = *Value++) )
35 | DumpByte(b);
36 | }
37 |
38 | void DumpInt(unsigned int Value)
39 | {
40 | DumpByte(Value & 0x00FF);
41 | DumpByte((Value & 0xFF00) >> 8);
42 | }
43 |
44 | void DumpLong(unsigned long Value)
45 | {
46 | DumpInt(Value & 0x0000FFFF);
47 | DumpInt((Value & 0xFFFF0000) >> 16);
48 | }
49 |
50 | void DumpBitmapHeader(boolean BW)
51 | {
52 | unsigned long lng;
53 |
54 | // BitmapFileHeader
55 | DumpString("BM"); // bfType
56 | lng = (BW ? 77878 : 230454);
57 | DumpLong(lng); // bfSize
58 | DumpLong(0); // bfReserved1
59 | lng = (BW ? 1078 : 54);
60 | DumpLong(lng); // bfOffbits
61 |
62 | // BitmapInfoHeader
63 | DumpLong(40); // biSize
64 | DumpLong(320); // biWidth
65 | DumpLong(240); // biHeight
66 | DumpInt(1); // biPlanes
67 | lng = (BW ? 8 : 24);
68 | DumpInt((int)lng); // biBitCount
69 | DumpLong(0); // biCompression
70 | lng = (BW ? 76800 : 230400);
71 | DumpLong(lng); // biSizeImage
72 | DumpLong(0); // biXPPerMeter
73 | DumpLong(0); // biYPPerMeter
74 | lng = (BW ? 256 : 0);
75 | DumpLong(lng); // biClrUsed
76 | DumpLong(0); // biClrImportant
77 |
78 | if(BW)
79 | {
80 | // create b/w palette
81 | for(int i = 0; i < 256; i++)
82 | {
83 | DumpByte(i);
84 | DumpByte(i);
85 | DumpByte(i);
86 | DumpByte(0);
87 | }
88 | }
89 | }
90 |
91 | void DumpUYV(byte U, byte Y, byte V)
92 | {
93 | byte R;
94 | byte G;
95 | byte B;
96 |
97 | Cam.UYV2RGB(U, Y, V, &R, &G, &B);
98 | DumpRGB(R, G, B);
99 | }
100 |
101 | void DumpRGB(byte R, byte G, byte B)
102 | {
103 | DumpByte(R);
104 | DumpByte(G);
105 | DumpByte(B);
106 | }
107 |
108 |
109 |
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/Arduino/sketchbook/ArduinoCam/Camera.ino:
--------------------------------------------------------------------------------
1 | // ArduinoCam Version 1.0 (2012-09-01) Firmware (Duemilanove Atmega168)
2 | // Copyright 2012 richard.prinz@min.at
3 | // See http://www.min.at/prinz/oe1rib/ArduinoCam/ for more infos
4 | //
5 | // This file is part of ArduinoCam
6 | //
7 | // ArduinoCam is free software and hardware design:
8 | // you can redistribute the software and the hardware design and/or modify it under
9 | // the terms of the GNU General Public License as published by the Free Software Foundation,
10 | // either version 3 of the License, or (at your option) any later version.
11 | //
12 | // ArduinoCam is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13 | // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 | // See the GNU General Public License for more details.
15 | //
16 | // You should have received a copy of the GNU General Public License along with ArduinoCam.
17 | // If not, see http://www.gnu.org/licenses/.
18 |
19 | #include
20 | #include
21 | #include
22 | #include
23 | #include
24 | #include
25 |
26 | #define FLAG_SHOW_PROMPT 1
27 | #define SHOW_PROMPT ((prgFlags & FLAG_SHOW_PROMPT) == FLAG_SHOW_PROMPT)
28 |
29 | #define FLAG_B64_OUTPUT 2
30 | #define IS_B64_ENCODED ((prgFlags & FLAG_B64_OUTPUT) == FLAG_B64_OUTPUT)
31 |
32 | byte prgFlags = FLAG_B64_OUTPUT | FLAG_SHOW_PROMPT;
33 | TC74 TC74x = TC74();
34 |
35 | void setup()
36 | {
37 | Serial.begin(115200);
38 | Wire.begin();
39 |
40 | Cam.Begin();
41 | TC74x.Begin(TC74A5_ADDR);
42 | DS1307x.Begin();
43 |
44 | InitCam();
45 | }
46 |
47 | void loop()
48 | {
49 | byte inByte;
50 | boolean result;
51 |
52 | if(SHOW_PROMPT)
53 | Serial.print(">");
54 |
55 | if(Serial.available() > 0)
56 | {
57 | inByte = Serial.read();
58 | Serial.write(inByte);
59 | Serial.println();
60 |
61 | switch(inByte)
62 | {
63 | case 'i': // initialize camera
64 | StartTextResult(false);
65 | InitCam();
66 | SendOK(NULL);
67 | break;
68 | case 's': // show camera register config
69 | StartTextResult(true);
70 | Cam.DumpConfig();
71 | SendOK(NULL);
72 | break;
73 | case 'x': // take picture
74 | StartTextResult(false);
75 | if(!Cam.Capture())
76 | SendERR(NULL);
77 | else
78 | SendOK(NULL);
79 | break;
80 |
81 | case 'T': // color testbar on
82 | StartTextResult(false);
83 | Cam.ColorBar(true);
84 | SendOK(NULL);
85 | break;
86 | case 't': // color testbar off
87 | StartTextResult(false);
88 | Cam.ColorBar(false);
89 | SendOK(NULL);
90 | break;
91 |
92 | case 'M':
93 | StartTextResult(false);
94 | Cam.Mirror(true);
95 | SendOK(NULL);
96 | break;
97 | case 'm':
98 | StartTextResult(false);
99 | Cam.Mirror(false);
100 | SendOK(NULL);
101 | break;
102 |
103 | case 'd': // hex dump picture
104 | StartTextResult(true);
105 | Cam.Dump(true);
106 | SendOK(NULL);
107 | break;
108 | case 'D': // binary dump picture
109 | StartBinaryResult();
110 | Cam.Dump(false);
111 | SendOK(NULL);
112 | break;
113 |
114 |
115 | case 'E': // encode B64 on
116 | StartTextResult(false);
117 | prgFlags |= FLAG_B64_OUTPUT;
118 | SendOK(NULL);
119 | break;
120 | case 'e': // encode B64 off
121 | StartTextResult(false);
122 | prgFlags &= ~(FLAG_B64_OUTPUT);
123 | SendOK(NULL);
124 | break;
125 |
126 |
127 | case 'R': // dump raw picture data in color
128 | StartPictureResult();
129 | ( DumpRaw(false) ? SendOK(NULL) : SendERR(NULL) );
130 | break;
131 | case 'r': // dump raw picture data in BW
132 | StartPictureResult();
133 | ( DumpRaw(true) ? SendOK(NULL) : SendERR(NULL) );
134 | break;
135 |
136 | case 'B': // dump picture as bitmap in color
137 | StartPictureResult();
138 | ( DumpPictureAsBitmap(false) ? SendOK(NULL) : SendERR(NULL) );
139 | break;
140 | case 'b': // dump picture as bitmap in BW
141 | StartPictureResult();
142 | ( DumpPictureAsBitmap(true) ? SendOK(NULL) : SendERR(NULL) );
143 | break;
144 |
145 |
146 | case 'c':
147 | PrintTemp();
148 | break;
149 |
150 | case 'I':
151 | SetTime();
152 | break;
153 | case 'C':
154 | PrintTime();
155 | break;
156 |
157 | default:
158 | StartTextResult(false);
159 | SendOK("UNK");
160 | }
161 | prgFlags |= FLAG_SHOW_PROMPT;
162 | }
163 | else
164 | {
165 | prgFlags &= ~(FLAG_SHOW_PROMPT);
166 | delay(200);
167 | }
168 | }
169 |
170 | void InitCam()
171 | {
172 | if(Cam.Reset())
173 | Cam.Init();
174 | }
175 |
176 | boolean DumpRaw(boolean BW)
177 | {
178 | byte b;
179 |
180 | if( IS_B64_ENCODED )
181 | B64EncodeStart("--- B64 start ---\n");
182 |
183 | Cam.ResetVideoPointer();
184 |
185 | // 76800 = 320 * 240
186 | for(unsigned long lc = 0; lc < 76800; lc++)
187 | {
188 | if(IsCanceled())
189 | {
190 | Serial.println();
191 | return false;
192 | }
193 |
194 | // read U/V
195 | b = Cam.ReadNextVideoByte();
196 | if(!BW)
197 | DumpByte(b);
198 |
199 | // read Y
200 | b = Cam.ReadNextVideoByte();
201 | DumpByte(b);
202 | }
203 |
204 | digitalWrite(BUS_RCK, LOW);
205 |
206 | if( IS_B64_ENCODED )
207 | B64EncodeDone("\n--- B64 end ---");
208 | Serial.println();
209 |
210 | return true;
211 | }
212 |
213 | boolean DumpPictureAsBitmap(boolean BW)
214 | {
215 | if( IS_B64_ENCODED )
216 | B64EncodeStart("--- B64 start ---\n");
217 |
218 | DumpBitmapHeader(BW);
219 |
220 | Cam.ResetVideoPointer();
221 |
222 | // UYVY Images are stored top-down, so the upper left pixel starts at byte 0.
223 | // Each 4 bytes represent the color for 2 neighboring pixels:
224 | //
225 | // [ U0 | Y0 | V0 | Y1 ]
226 | //
227 | // Y0 is the brightness of pixel 0, Y1 the brightness of pixel 1.
228 | // U0 and V0 is the color of both pixels.
229 |
230 | byte U;
231 | byte Y;
232 | byte V;
233 |
234 | for(int lc = 0; lc < 240; lc++)
235 | {
236 | for(int pc = 0; pc < 160; pc++)
237 | {
238 | if(IsCanceled())
239 | {
240 | Serial.println();
241 | return false;
242 | }
243 |
244 | U = Cam.ReadNextVideoByte();
245 | Y = Cam.ReadNextVideoByte();
246 | V = Cam.ReadNextVideoByte();
247 |
248 | if(BW)
249 | {
250 | DumpByte(Y);
251 | Y = Cam.ReadNextVideoByte();
252 | DumpByte(Y);
253 | }
254 | else
255 | {
256 | DumpUYV(U, Y, V);
257 | Y = Cam.ReadNextVideoByte();
258 | DumpUYV(U, Y, V);
259 | }
260 | }
261 | }
262 |
263 | digitalWrite(BUS_RCK, LOW);
264 |
265 | if( IS_B64_ENCODED )
266 | B64EncodeDone("\n--- B64 end ---");
267 | Serial.println();
268 |
269 | return true;
270 | }
271 |
272 |
273 |
274 | void StartTextResult(boolean MultiLine)
275 | {
276 | Serial.print( (MultiLine ? "=\r\n" : "-\r\n") );
277 | }
278 |
279 | void StartBinaryResult()
280 | {
281 | Serial.print("@\r\n");
282 | }
283 |
284 | void StartPictureResult()
285 | {
286 | if( IS_B64_ENCODED )
287 | StartTextResult(true);
288 | else
289 | StartBinaryResult();
290 | }
291 |
292 | void SendOK(char *Message)
293 | {
294 | Serial.print("OK ");
295 | SendMSG(Message);
296 | Serial.println();
297 | }
298 |
299 | void SendERR(char *Message)
300 | {
301 | Serial.print("ERR ");
302 | SendMSG(Message);
303 | Serial.println();
304 | }
305 |
306 | void SendMSG(char *Message)
307 | {
308 | if(Message != NULL)
309 | Serial.print(Message);
310 | }
311 |
312 | boolean IsCanceled()
313 | {
314 | byte inByte;
315 |
316 | if(Serial.available() > 0)
317 | {
318 | inByte = Serial.read();
319 | if(inByte == '.')
320 | return true;
321 | }
322 |
323 | return false;
324 | }
325 |
326 |
327 |
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/Arduino/sketchbook/ArduinoCam/DS1307.ino:
--------------------------------------------------------------------------------
1 | // ArduinoCam Version 1.0 (2012-09-01) Firmware (Duemilanove Atmega168)
2 | // Copyright 2012 richard.prinz@min.at
3 | // See http://www.min.at/prinz/oe1rib/ArduinoCam/ for more infos
4 | //
5 | // This file is part of ArduinoCam
6 | //
7 | // ArduinoCam is free software and hardware design:
8 | // you can redistribute the software and the hardware design and/or modify it under
9 | // the terms of the GNU General Public License as published by the Free Software Foundation,
10 | // either version 3 of the License, or (at your option) any later version.
11 | //
12 | // ArduinoCam is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13 | // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 | // See the GNU General Public License for more details.
15 | //
16 | // You should have received a copy of the GNU General Public License along with ArduinoCam.
17 | // If not, see http://www.gnu.org/licenses/.
18 |
19 | // ***************************************************************************
20 | // DS1307 I2C RTC
21 | // ***************************************************************************
22 |
23 | void SetTime()
24 | {
25 | Serial.print(" YY.MM.DD WD hh:mm:ss\r\n");
26 | Serial.print(":");
27 |
28 | bool valid;
29 | byte a[7];
30 | byte b;
31 | for(char i = 6; i >= 0; i--)
32 | {
33 | b = Tools::ReadDec(2, DI_ECHO | DI_AUTO_SKIP, &valid);
34 | a[i] = Tools::dec2bcd(b);
35 | if(!valid)
36 | break;
37 | if(i > 0)
38 | Serial.print(i == 4 || i == 3 ? " " : (i < 3 ? ":" : "."));
39 | }
40 |
41 | Serial.println();
42 | if(valid)
43 | {
44 | //for(char i = 6; i >= 0; i--)
45 | // Serial.println(a[i], HEX);
46 | DS1307x.WriteTimeArray(a);
47 | SendOK(NULL);
48 | }
49 | else
50 | SendERR(NULL);
51 | }
52 |
53 | void PrintTime()
54 | {
55 | StartTextResult(false);
56 |
57 | if(DS1307x.ReadTime())
58 | {
59 | PrintLeading(DS1307x._rtc_hour);
60 | Serial.print(":");
61 | PrintLeading(DS1307x._rtc_min);
62 | Serial.print(":");
63 | PrintLeading(DS1307x._rtc_sec);
64 | Serial.print("\r\n");
65 |
66 | SendOK(NULL);
67 | }
68 | else
69 | SendERR(NULL);
70 | }
71 |
72 | void PrintLeading(byte Value)
73 | {
74 | if(Value < 10)
75 | Serial.print("0");
76 | Serial.print(Value, DEC);
77 | }
78 |
79 |
80 |
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/Arduino/sketchbook/ArduinoCam/TC74.ino:
--------------------------------------------------------------------------------
1 | // ArduinoCam Version 1.0 (2012-09-01) Firmware (Duemilanove Atmega168)
2 | // Copyright 2012 richard.prinz@min.at
3 | // See http://www.min.at/prinz/oe1rib/ArduinoCam/ for more infos
4 | //
5 | // This file is part of ArduinoCam
6 | //
7 | // ArduinoCam is free software and hardware design:
8 | // you can redistribute the software and the hardware design and/or modify it under
9 | // the terms of the GNU General Public License as published by the Free Software Foundation,
10 | // either version 3 of the License, or (at your option) any later version.
11 | //
12 | // ArduinoCam is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13 | // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 | // See the GNU General Public License for more details.
15 | //
16 | // You should have received a copy of the GNU General Public License along with ArduinoCam.
17 | // If not, see http://www.gnu.org/licenses/.
18 |
19 | // ***************************************************************************
20 | // TC74 I2C Temp sensor
21 | // ***************************************************************************
22 |
23 | void PrintTemp()
24 | {
25 | StartTextResult(false);
26 |
27 | char temp = TC74x.ReadTemperature();
28 | if((unsigned byte)temp == TC74_VALUE_ERROR)
29 | SendERR(NULL);
30 | else
31 | {
32 | Serial.print(temp, DEC);
33 | Serial.println();
34 | SendOK(NULL);
35 | }
36 | }
37 |
38 |
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/ArduinoCamHW.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/ArduinoCamHW.pdf
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/ArduinoCam.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 8.0.50727
7 | 2.0
8 | {02D334AA-8202-4054-BB7A-44CEC4A2908E}
9 | WinExe
10 | Properties
11 | ArduinoCam
12 | ArduinoCam
13 |
14 |
15 | 3.5
16 |
17 |
18 | v2.0
19 |
20 |
21 | true
22 | full
23 | false
24 | bin\Debug\
25 | DEBUG;TRACE
26 | prompt
27 | 4
28 | AllRules.ruleset
29 |
30 |
31 | pdbonly
32 | true
33 | bin\Release\
34 | TRACE
35 | prompt
36 | 4
37 | AllRules.ruleset
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | Form
50 |
51 |
52 | Form1.cs
53 |
54 |
55 |
56 |
57 | Designer
58 | Form1.cs
59 |
60 |
61 |
62 |
69 |
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/ArduinoCam.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual Studio 2010
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArduinoCam", "ArduinoCam.csproj", "{02D334AA-8202-4054-BB7A-44CEC4A2908E}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Any CPU = Debug|Any CPU
9 | Release|Any CPU = Release|Any CPU
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {02D334AA-8202-4054-BB7A-44CEC4A2908E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13 | {02D334AA-8202-4054-BB7A-44CEC4A2908E}.Debug|Any CPU.Build.0 = Debug|Any CPU
14 | {02D334AA-8202-4054-BB7A-44CEC4A2908E}.Release|Any CPU.ActiveCfg = Release|Any CPU
15 | {02D334AA-8202-4054-BB7A-44CEC4A2908E}.Release|Any CPU.Build.0 = Release|Any CPU
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/ArduinoCam.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/ArduinoCam.suo
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/Form1.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace SSTV
2 | {
3 | partial class Form1
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose( bool disposing )
15 | {
16 | if ( disposing && ( components != null ) )
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose( disposing );
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.PictureBox = new System.Windows.Forms.PictureBox();
32 | this.btnReset = new System.Windows.Forms.Button();
33 | this.btnStatus = new System.Windows.Forms.Button();
34 | this.btnCapture = new System.Windows.Forms.Button();
35 | this.btnTransfer = new System.Windows.Forms.Button();
36 | this.lblPicture = new System.Windows.Forms.Label();
37 | this.txtConsole = new System.Windows.Forms.TextBox();
38 | this.lblConsole = new System.Windows.Forms.Label();
39 | this.statusBar = new System.Windows.Forms.StatusStrip();
40 | this.lblStatus = new System.Windows.Forms.ToolStripStatusLabel();
41 | this.progressBar1 = new System.Windows.Forms.ToolStripProgressBar();
42 | this.cmbPort = new System.Windows.Forms.ComboBox();
43 | ((System.ComponentModel.ISupportInitialize)(this.PictureBox)).BeginInit();
44 | this.statusBar.SuspendLayout();
45 | this.SuspendLayout();
46 | //
47 | // PictureBox
48 | //
49 | this.PictureBox.Anchor = System.Windows.Forms.AnchorStyles.Top;
50 | this.PictureBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
51 | this.PictureBox.Location = new System.Drawing.Point(63, 51);
52 | this.PictureBox.Name = "PictureBox";
53 | this.PictureBox.Size = new System.Drawing.Size(321, 257);
54 | this.PictureBox.TabIndex = 1;
55 | this.PictureBox.TabStop = false;
56 | //
57 | // btnReset
58 | //
59 | this.btnReset.Location = new System.Drawing.Point(11, 7);
60 | this.btnReset.Name = "btnReset";
61 | this.btnReset.Size = new System.Drawing.Size(75, 23);
62 | this.btnReset.TabIndex = 6;
63 | this.btnReset.Text = "Reset";
64 | this.btnReset.UseVisualStyleBackColor = true;
65 | this.btnReset.Click += new System.EventHandler(this.btnReset_Click);
66 | //
67 | // btnStatus
68 | //
69 | this.btnStatus.Location = new System.Drawing.Point(92, 7);
70 | this.btnStatus.Name = "btnStatus";
71 | this.btnStatus.Size = new System.Drawing.Size(75, 23);
72 | this.btnStatus.TabIndex = 7;
73 | this.btnStatus.Text = "Status";
74 | this.btnStatus.UseVisualStyleBackColor = true;
75 | this.btnStatus.Click += new System.EventHandler(this.btnStatus_Click);
76 | //
77 | // btnCapture
78 | //
79 | this.btnCapture.Location = new System.Drawing.Point(173, 7);
80 | this.btnCapture.Name = "btnCapture";
81 | this.btnCapture.Size = new System.Drawing.Size(75, 23);
82 | this.btnCapture.TabIndex = 8;
83 | this.btnCapture.Text = "Capture";
84 | this.btnCapture.UseVisualStyleBackColor = true;
85 | this.btnCapture.Click += new System.EventHandler(this.btnCapture_Click);
86 | //
87 | // btnTransfer
88 | //
89 | this.btnTransfer.Location = new System.Drawing.Point(254, 7);
90 | this.btnTransfer.Name = "btnTransfer";
91 | this.btnTransfer.Size = new System.Drawing.Size(75, 23);
92 | this.btnTransfer.TabIndex = 9;
93 | this.btnTransfer.Text = "Transfer";
94 | this.btnTransfer.UseVisualStyleBackColor = true;
95 | this.btnTransfer.Click += new System.EventHandler(this.btnTransfer_Click);
96 | //
97 | // lblPicture
98 | //
99 | this.lblPicture.AutoSize = true;
100 | this.lblPicture.Location = new System.Drawing.Point(11, 33);
101 | this.lblPicture.Name = "lblPicture";
102 | this.lblPicture.Size = new System.Drawing.Size(40, 13);
103 | this.lblPicture.TabIndex = 10;
104 | this.lblPicture.Text = "Picture";
105 | //
106 | // txtConsole
107 | //
108 | this.txtConsole.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
109 | | System.Windows.Forms.AnchorStyles.Right)));
110 | this.txtConsole.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
111 | this.txtConsole.Location = new System.Drawing.Point(11, 346);
112 | this.txtConsole.Multiline = true;
113 | this.txtConsole.Name = "txtConsole";
114 | this.txtConsole.ReadOnly = true;
115 | this.txtConsole.ScrollBars = System.Windows.Forms.ScrollBars.Both;
116 | this.txtConsole.Size = new System.Drawing.Size(423, 105);
117 | this.txtConsole.TabIndex = 11;
118 | this.txtConsole.WordWrap = false;
119 | //
120 | // lblConsole
121 | //
122 | this.lblConsole.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
123 | this.lblConsole.AutoSize = true;
124 | this.lblConsole.Location = new System.Drawing.Point(12, 330);
125 | this.lblConsole.Name = "lblConsole";
126 | this.lblConsole.Size = new System.Drawing.Size(45, 13);
127 | this.lblConsole.TabIndex = 12;
128 | this.lblConsole.Text = "Console";
129 | //
130 | // statusBar
131 | //
132 | this.statusBar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
133 | this.lblStatus,
134 | this.progressBar1});
135 | this.statusBar.Location = new System.Drawing.Point(0, 465);
136 | this.statusBar.Name = "statusBar";
137 | this.statusBar.Size = new System.Drawing.Size(446, 22);
138 | this.statusBar.TabIndex = 14;
139 | //
140 | // lblStatus
141 | //
142 | this.lblStatus.Name = "lblStatus";
143 | this.lblStatus.Size = new System.Drawing.Size(0, 17);
144 | //
145 | // progressBar1
146 | //
147 | this.progressBar1.Name = "progressBar1";
148 | this.progressBar1.Size = new System.Drawing.Size(100, 16);
149 | this.progressBar1.Visible = false;
150 | //
151 | // cmbPort
152 | //
153 | this.cmbPort.FormattingEnabled = true;
154 | this.cmbPort.Location = new System.Drawing.Point(335, 7);
155 | this.cmbPort.Name = "cmbPort";
156 | this.cmbPort.Size = new System.Drawing.Size(102, 21);
157 | this.cmbPort.TabIndex = 15;
158 | //
159 | // Form1
160 | //
161 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
162 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
163 | this.ClientSize = new System.Drawing.Size(446, 487);
164 | this.Controls.Add(this.cmbPort);
165 | this.Controls.Add(this.statusBar);
166 | this.Controls.Add(this.lblConsole);
167 | this.Controls.Add(this.txtConsole);
168 | this.Controls.Add(this.lblPicture);
169 | this.Controls.Add(this.btnTransfer);
170 | this.Controls.Add(this.btnCapture);
171 | this.Controls.Add(this.btnStatus);
172 | this.Controls.Add(this.btnReset);
173 | this.Controls.Add(this.PictureBox);
174 | this.Name = "Form1";
175 | this.Text = "Arduino Cam";
176 | ((System.ComponentModel.ISupportInitialize)(this.PictureBox)).EndInit();
177 | this.statusBar.ResumeLayout(false);
178 | this.statusBar.PerformLayout();
179 | this.ResumeLayout(false);
180 | this.PerformLayout();
181 |
182 | }
183 |
184 | #endregion
185 |
186 | private System.Windows.Forms.PictureBox PictureBox;
187 | private System.Windows.Forms.Button btnReset;
188 | private System.Windows.Forms.Button btnStatus;
189 | private System.Windows.Forms.Button btnCapture;
190 | private System.Windows.Forms.Button btnTransfer;
191 | private System.Windows.Forms.Label lblPicture;
192 | private System.Windows.Forms.TextBox txtConsole;
193 | private System.Windows.Forms.Label lblConsole;
194 | private System.Windows.Forms.StatusStrip statusBar;
195 | private System.Windows.Forms.ToolStripStatusLabel lblStatus;
196 | private System.Windows.Forms.ToolStripProgressBar progressBar1;
197 | private System.Windows.Forms.ComboBox cmbPort;
198 | }
199 | }
200 |
201 |
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/Form1.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/Form1.cs
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/Form1.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | 17, 17
122 |
123 |
124 | 40
125 |
126 |
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/Program.cs:
--------------------------------------------------------------------------------
1 | // ArduinoCam Version 1.0 (2012-09-01) Firmware (Duemilanove Atmega168)
2 | // Copyright 2012 richard.prinz@min.at
3 | // See http://www.min.at/prinz/oe1rib/ArduinoCam/ for more infos
4 | //
5 | // This file is part of ArduinoCam
6 | //
7 | // ArduinoCam is free software and hardware design:
8 | // you can redistribute the software and the hardware design and/or modify it under
9 | // the terms of the GNU General Public License as published by the Free Software Foundation,
10 | // either version 3 of the License, or (at your option) any later version.
11 | //
12 | // ArduinoCam is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13 | // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 | // See the GNU General Public License for more details.
15 | //
16 | // You should have received a copy of the GNU General Public License along with ArduinoCam.
17 | // If not, see http://www.gnu.org/licenses/.
18 |
19 | using System;
20 | using System.Collections.Generic;
21 | using System.Windows.Forms;
22 |
23 | namespace SSTV
24 | {
25 | static class Program
26 | {
27 | ///
28 | /// The main entry point for the application.
29 | ///
30 | [STAThread]
31 | static void Main()
32 | {
33 | Application.EnableVisualStyles();
34 | Application.SetCompatibleTextRenderingDefault( false );
35 | Application.Run( new Form1() );
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // ArduinoCam Version 1.0 (2012-09-01) Firmware (Duemilanove Atmega168)
2 | // Copyright 2012 richard.prinz@min.at
3 | // See http://www.min.at/prinz/oe1rib/ArduinoCam/ for more infos
4 | //
5 | // This file is part of ArduinoCam
6 | //
7 | // ArduinoCam is free software and hardware design:
8 | // you can redistribute the software and the hardware design and/or modify it under
9 | // the terms of the GNU General Public License as published by the Free Software Foundation,
10 | // either version 3 of the License, or (at your option) any later version.
11 | //
12 | // ArduinoCam is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13 | // without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 | // See the GNU General Public License for more details.
15 | //
16 | // You should have received a copy of the GNU General Public License along with ArduinoCam.
17 | // If not, see http://www.gnu.org/licenses/.
18 |
19 | using System.Reflection;
20 | using System.Runtime.CompilerServices;
21 | using System.Runtime.InteropServices;
22 |
23 | // General Information about an assembly is controlled through the following
24 | // set of attributes. Change these attribute values to modify the information
25 | // associated with an assembly.
26 | [assembly: AssemblyTitle( "ArdionoCam PC client" )]
27 | [assembly: AssemblyDescription("see http://www.min.at/prinz/oe1rib/ArduinoCam/")]
28 | [assembly: AssemblyConfiguration( "" )]
29 | [assembly: AssemblyCompany( "MIN.at" )]
30 | [assembly: AssemblyProduct( "ArduinoCam" )]
31 | [assembly: AssemblyCopyright( "Copyright © 2012 richard.prinz@min.at" )]
32 | [assembly: AssemblyTrademark( "" )]
33 | [assembly: AssemblyCulture( "" )]
34 |
35 | // Setting ComVisible to false makes the types in this assembly not visible
36 | // to COM components. If you need to access a type in this assembly from
37 | // COM, set the ComVisible attribute to true on that type.
38 | [assembly: ComVisible( false )]
39 |
40 | // The following GUID is for the ID of the typelib if this project is exposed to COM
41 | [assembly: Guid( "ce46f59b-1c56-4eb6-891e-763e5a3ffa8a" )]
42 |
43 | // Version information for an assembly consists of the following four values:
44 | //
45 | // Major Version
46 | // Minor Version
47 | // Build Number
48 | // Revision
49 | //
50 | [assembly: AssemblyVersion( "1.0.0.0" )]
51 | [assembly: AssemblyFileVersion( "1.0.0.0" )]
52 |
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/bin/Debug/ArduinoCam.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/bin/Debug/ArduinoCam.exe
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/bin/Debug/ArduinoCam.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/bin/Debug/ArduinoCam.pdb
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/bin/Debug/ArduinoCam.vshost.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/bin/Debug/ArduinoCam.vshost.exe
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/obj/Debug/ArduinoCam.csproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | C:\Users\Richard\Desktop\ArduCam\PC\bin\Debug\ArduinoCam.exe
2 | C:\Users\Richard\Desktop\ArduCam\PC\bin\Debug\ArduinoCam.pdb
3 | C:\Users\Richard\Desktop\ArduCam\PC\obj\Debug\ResolveAssemblyReference.cache
4 | C:\Users\Richard\Desktop\ArduCam\PC\obj\Debug\SSTV.Form1.resources
5 | C:\Users\Richard\Desktop\ArduCam\PC\obj\Debug\ResGen.read.1.tlog
6 | C:\Users\Richard\Desktop\ArduCam\PC\obj\Debug\ResGen.write.1.tlog
7 | C:\Users\Richard\Desktop\ArduCam\PC\obj\Debug\ArduinoCam.exe
8 | C:\Users\Richard\Desktop\ArduCam\PC\obj\Debug\ArduinoCam.pdb
9 |
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/obj/Debug/ArduinoCam.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/obj/Debug/ArduinoCam.exe
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/obj/Debug/ArduinoCam.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/obj/Debug/ArduinoCam.pdb
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/obj/Debug/ResGen.read.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/obj/Debug/ResGen.read.1.tlog
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/obj/Debug/ResGen.write.1.tlog:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/obj/Debug/ResGen.write.1.tlog
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/obj/Debug/SSTV.Form1.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ArduinoCam/PC/obj/Debug/SSTV.Form1.resources
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/CMOS_AL422_STM32F103ZET6_ili9328.rar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/CMOS_AL422_STM32F103ZET6_ili9328.rar
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/OV7725+AL422_REV1.21_PCB.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/OV7725+AL422_REV1.21_PCB.pdf
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/OV7725+AL422_REV1.21_SCH.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/OV7725+AL422_REV1.21_SCH.pdf
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/OV7725_CSP2_DS.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/OV7725_CSP2_DS.pdf
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/Read Me.txt:
--------------------------------------------------------------------------------
1 |
2 |
3 | // 1 3.3V
4 | // 2 GND
5 | // 3 SCCB_C GPIOD_2
6 | // 4 SCCB_D GPIOD_3
7 | // 5 VSYNC GPIOC_3
8 | // 6 WRST GPIOF_8 H
9 | // 7 WEN GPIOF_11 L
10 | // 8 NC
11 | // 9 RRST GPIOF_9 H
12 | // 10 OE GPIOF_7 L
13 | // 11 RCLK GPIOF_10 L/H
14 | // 12 GND
15 | // 13 D0 PB8
16 | // 14 D1 PB9
17 | // 15 D2 PB10
18 | // 16 D3 PB11
19 | // 17 D4 PB12
20 | // 18 D5 PB13
21 | // 19 D6 PB14
22 | // 20 D7 PB15
23 |
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/al422.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/al422.pdf
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ov7725_cam_fifo.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraAL422B/datasheet/OV7725 Camera Module with FIFO/ov7725_cam_fifo.PNG
--------------------------------------------------------------------------------
/CameraAL422B/datasheet/al422.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraAL422B/datasheet/al422.pdf
--------------------------------------------------------------------------------
/CameraOV7670/CameraOV7670.cpp:
--------------------------------------------------------------------------------
1 | /**
2 | * Arduino - CameraOV7670 implementation.
3 | *
4 | * CameraOV7670.cpp
5 | *
6 | * The class CameraOV7670.
7 | *
8 | * @author Dalmir da Silva
9 | */
10 |
11 | #ifndef __ARDUINO_DRIVER_CAMERA_OV7670_CPP__
12 | #define __ARDUINO_DRIVER_CAMERA_OV7670_CPP__ 1
13 |
14 | #include "CameraOV7670.h"
15 |
16 | CameraOV7670::CameraOV7670(unsigned char (*read)(), unsigned char vsyncPin,
17 | unsigned char hsyncPin) :
18 | Camera() {
19 | this->read = read;
20 | this->vsyncPin = vsyncPin;
21 | this->hsyncPin = hsyncPin;
22 | address = 0x42;
23 | Wire.begin();
24 | }
25 |
26 | int CameraOV7670::readFrame(OutputStream *out) {
27 | return 0;
28 | }
29 |
30 | #endif /* __ARDUINO_DRIVER_CAMERA_OV7670_CPP__ */
31 |
--------------------------------------------------------------------------------
/CameraOV7670/CameraOV7670.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Arduino - CameraOV7670 implementation.
3 | *
4 | * CameraOV7670.h
5 | *
6 | * The class CameraOV7670.
7 | *
8 | * @author Dalmir da Silva
9 | */
10 |
11 | #ifndef __ARDUINO_DRIVER_CAMERA_OV7670_H__
12 | #define __ARDUINO_DRIVER_CAMERA_OV7670_H__ 1
13 |
14 | // CCIR656 enable
15 | #define OV7670_COM1_CCIR656 0x40
16 |
17 | // Soft sleep mode
18 | #define OV7670_COM2_SSLEEP 0x10
19 |
20 | // Byte swap
21 | #define OV7670_COM3_SWAP 0x40
22 |
23 | // Enable scaling
24 | #define OV7670_COM3_SCALEEN 0x08
25 |
26 | // Enable downsamp/crop/window
27 | #define OV7670_COM3_DCWEN 0x04
28 |
29 | // Use external clock directly
30 | #define OV7670_CLKRC_EXT 0x40
31 |
32 | // Mask for internal clock scale
33 | #define OV7670_CLKRC_SCALE 0x3f
34 |
35 | // Reset
36 | #define OV7670_COM7_RESET 0x80
37 |
38 | //
39 | #define OV7670_COM7_FMT_MASK 0x38
40 |
41 | //
42 | #define OV7670_COM7_FMT_VGA 0x00
43 |
44 | // CIF format
45 | #define OV7670_COM7_FMT_CIF 0x20
46 |
47 | // QVGA format
48 | #define OV7670_COM7_FMT_QVGA 0x10
49 |
50 | // QCIF format
51 | #define OV7670_COM7_FMT_QCIF 0x08
52 |
53 | // bits 0 and 2 - RGB format
54 | #define OV7670_COM7_RGB 0x04
55 |
56 | // YUV
57 | #define OV7670_COM7_YUV 0x00
58 |
59 | // Bayer format
60 | #define OV7670_COM7_BAYER 0x01
61 |
62 | // Processed bayer
63 | #define OV7670_COM7_PBAYER 0x05
64 |
65 | // Enable fast AGC/AEC
66 | #define OV7670_COM8_FASTAEC 0x80
67 |
68 | // Unlimited AEC step size
69 | #define OV7670_COM8_AECSTEP 0x40
70 |
71 | // Band filter enable
72 | #define OV7670_COM8_BFILT 0x20
73 |
74 | // Auto gain enable
75 | #define OV7670_COM8_AGC 0x04
76 |
77 | // White balance enable
78 | #define OV7670_COM8_AWB 0x02
79 |
80 | // Auto exposure enable
81 | #define OV7670_COM8_AEC 0x01
82 |
83 | // HSYNC instead of HREF
84 | #define OV7670_COM10_HSYNC 0x40
85 |
86 | // Suppress PCLK on horiz blank
87 | #define OV7670_COM10_PCLK_HB 0x20
88 |
89 | // Reverse HREF
90 | #define OV7670_COM10_HREF_REV 0x08
91 |
92 | // VSYNC on clock leading edge
93 | #define OV7670_COM10_VS_LEAD 0x04
94 |
95 | // VSYNC negative
96 | #define OV7670_COM10_VS_NEG 0x02
97 |
98 | // HSYNC negative
99 | #define OV7670_COM10_HS_NEG 0x01
100 |
101 | // Mirror image
102 | #define OV7670_MVFP_MIRROR 0x20
103 |
104 | // Vertical flip
105 | #define OV7670_MVFP_FLIP 0x10
106 |
107 | // UYVY or VYUY - see com13
108 | #define OV7670_TSLB_YLAST 0x04
109 |
110 | // NIght mode enable
111 | #define OV7670_COM11_NIGHT 0x80
112 |
113 | // Two bit NM frame rate
114 | #define OV7670_COM11_NMFR 0x60
115 |
116 | // Auto detect 50/60 Hz
117 | #define OV7670_COM11_HZAUTO 0x10
118 |
119 | // Manual 50Hz select
120 | #define OV7670_COM11_50HZ 0x08
121 |
122 | // Exp
123 | #define OV7670_COM11_EXP 0x02
124 |
125 | // HREF always
126 | #define OV7670_COM12_HREF 0x80
127 |
128 | // Gamma enable
129 | #define OV7670_COM13_GAMMA 0x80
130 |
131 | // UV saturation auto adjustment
132 | #define OV7670_COM13_UVSAT 0x40
133 |
134 | // V before U - w/TSLB
135 | #define OV7670_COM13_UVSWAP 0x01
136 |
137 | // DCW/PCLK-scale enable
138 | #define OV7670_COM14_DCWEN 0x10
139 |
140 | // Data range 10 to F0
141 | #define OV7670_COM15_R10F0 0x00
142 |
143 | // Data range 01 to FE
144 | #define OV7670_COM15_R01FE 0x80
145 |
146 | // Data range 00 to FF
147 | #define OV7670_COM15_R00FF 0xc0
148 |
149 | // RGB565 output
150 | #define OV7670_COM15_RGB565 0x10
151 |
152 | // RGB555 output
153 | #define OV7670_COM15_RGB555 0x30
154 |
155 | // AWB gain enable
156 | #define OV7670_COM16_AWBGAIN 0x08
157 |
158 | // AEC window - must match COM4
159 | #define OV7670_COM17_AECWIN 0xc0
160 |
161 | // DSP Color bar
162 | #define OV7670_COM17_CBAR 0x08
163 |
164 | // Length
165 | #define OV7670_CMATRIX_LEN 0x06
166 |
167 | // Black pixel correction enable
168 | #define OV7670_R76_BLKPCOR 0x80
169 |
170 | // White pixel correction enable
171 | #define OV7670_R76_WHTPCOR 0x40
172 |
173 | // Turn on RGB444, overrides 5x5
174 | #define OV7670_RGB444_ENABLE 0x02
175 |
176 | // Empty nibble at end
177 | #define OV7670_RGB444_RGBX 0x01
178 |
179 | #include
180 | #include
181 | #include
182 |
183 | class CameraOV7670 : public Camera {
184 | private:
185 |
186 | unsigned char (*read)();
187 |
188 | unsigned char vsyncPin;
189 |
190 | unsigned char hsyncPin;
191 |
192 | unsigned char address;
193 | public:
194 |
195 | enum Register {
196 |
197 | // Gain lower 8 bits (rest in vref)
198 | REG_GAIN = 0x00,
199 |
200 | // blue gain
201 | REG_BLUE = 0x01,
202 |
203 | // red gain
204 | REG_RED = 0x02,
205 |
206 | // Pieces of GAIN, VSTART, VSTOP
207 | REG_VREF = 0x03,
208 |
209 | // Control 1
210 | REG_COM1 = 0x04,
211 |
212 | // U/B Average level
213 | REG_BAVE = 0x05,
214 |
215 | // Y/Gb Average level
216 | REG_GBAVE = 0x06,
217 |
218 | // AEC MS 5 bits
219 | REG_AECHH = 0x07,
220 |
221 | // V/R Average level
222 | REG_RAVE = 0x08,
223 |
224 | // Control 2
225 | REG_COM2 = 0x09,
226 |
227 | // Product ID MSB
228 | REG_PID = 0x0a,
229 |
230 | // Product ID LSB
231 | REG_VER = 0x0b,
232 |
233 | // Control 3
234 | REG_COM3 = 0x0c,
235 |
236 | // Control 4
237 | REG_COM4 = 0x0d,
238 |
239 | // All "reserved"
240 | REG_COM5 = 0x0e,
241 |
242 | // Control 6
243 | REG_COM6 = 0x0f,
244 |
245 | // More bits of AEC value
246 | REG_AECH = 0x10,
247 |
248 | // Clocl control
249 | REG_CLKRC = 0x11,
250 |
251 | // Control 7
252 | REG_COM7 = 0x12,
253 |
254 | // Control 8
255 | REG_COM8 = 0x13,
256 |
257 | // Control 9 - gain ceiling
258 | REG_COM9 = 0x14,
259 |
260 | // Control 10
261 | REG_COM10 = 0x15,
262 |
263 | // Horiz start high bits
264 | REG_HSTART = 0x17,
265 |
266 | // Horiz stop high bits
267 | REG_HSTOP = 0x18,
268 |
269 | // Vert start high bits
270 | REG_VSTART = 0x19,
271 |
272 | // Vert stop high bits
273 | REG_VSTOP = 0x1a,
274 |
275 | // Pixel delay after HREF
276 | REG_PSHFT = 0x1b,
277 |
278 | // Manuf. ID high
279 | REG_MIDH = 0x1c,
280 |
281 | // Manuf. ID low
282 | REG_MIDL = 0x1d,
283 |
284 | // Mirror / vflip
285 | REG_MVFP = 0x1e,
286 |
287 | // AGC upper limit
288 | REG_AEW = 0x24,
289 |
290 | // AGC lower limit
291 | REG_AEB = 0x25,
292 |
293 | // AGC/AEC fast mode op region
294 | REG_VPT = 0x26,
295 |
296 | // HSYNC rising edge delay
297 | REG_HSYST = 0x30,
298 |
299 | // HSYNC falling edge delay
300 | REG_HSYEN = 0x31,
301 |
302 | // HREF pieces
303 | REG_HREF = 0x32,
304 |
305 | // Lots of stuff
306 | REG_TSLB = 0x3a,
307 |
308 | // Control 11
309 | REG_COM11 = 0x3b,
310 |
311 | // Control 12
312 | REG_COM12 = 0x3c,
313 |
314 | // Control 13
315 | REG_COM13 = 0x3d,
316 |
317 | // Control 14
318 | REG_COM14 = 0x3e,
319 |
320 | // Edge enhancement factor
321 | REG_EDGE = 0x3f,
322 |
323 | // Control 15
324 | REG_COM15 = 0x40,
325 |
326 | // Control 16
327 | REG_COM16 = 0x41,
328 |
329 | // Control 17
330 | REG_COM17 = 0x42,
331 |
332 | // CMatrix base
333 | REG_CMATRIX_BASE = 0x4f,
334 |
335 | // CMatrix sign
336 | REG_CMATRIX_SIGN = 0x58,
337 |
338 | // Brightness
339 | REG_BRIGHT = 0x55,
340 |
341 | // Contrast control
342 | REG_CONTRAS = 0x56,
343 |
344 | // Fix gain control
345 | REG_GFIX = 0x69,
346 |
347 | // OV's name
348 | REG_R76 = 0x76,
349 |
350 | // RGB 444 control
351 | REG_RGB444 = 0x8c,
352 |
353 | // Hist AEC/AGC control 1
354 | REG_HAECC1 = 0x9f,
355 |
356 | // Hist AEC/AGC control 2
357 | REG_HAECC2 = 0xa0,
358 |
359 | // 50hz banding step limit
360 | REG_BD50MAX = 0xa5,
361 |
362 | // Hist AEC/AGC control 3
363 | REG_HAECC3 = 0xa6,
364 |
365 | // Hist AEC/AGC control 4
366 | REG_HAECC4 = 0xa7,
367 |
368 | // Hist AEC/AGC control 5
369 | REG_HAECC5 = 0xa8,
370 |
371 | // Hist AEC/AGC control 6
372 | REG_HAECC6 = 0xa9,
373 |
374 | // Hist AEC/AGC control 7
375 | REG_HAECC7 = 0xaa,
376 |
377 | // 60hz banding step limit
378 | REG_BD60MAX = 0xab
379 | };
380 |
381 | /**
382 | * Public constructor.
383 | *
384 | * @param read The reader function.
385 | * @param vsyncPin The vertical sync pin number.
386 | * @param hsyncPin The horizontal sync pin number.
387 | * @param pclkPin The clock pin number.
388 | */
389 | CameraOV7670(unsigned char (*read)(), unsigned char vsyncPin,
390 | unsigned char hsyncPin);
391 |
392 | /**
393 | * Clears the buffers.
394 | */
395 | void clearBuffers();
396 |
397 | /**
398 | * Returns a frame.
399 | *
400 | * @param out The frame out.
401 | * @return The frame size.
402 | */
403 | int readFrame(OutputStream *out);
404 | };
405 |
406 | #endif /* __ARDUINO_DRIVER_CAMERA_OV7670_H__ */
407 |
--------------------------------------------------------------------------------
/CameraOV7670/datasheet/.goutputstream-8KP7NW:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraOV7670/datasheet/.goutputstream-8KP7NW
--------------------------------------------------------------------------------
/CameraOV7670/datasheet/.goutputstream-WAXWNW:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraOV7670/datasheet/.goutputstream-WAXWNW
--------------------------------------------------------------------------------
/CameraOV7670/datasheet/.goutputstream-ZL6RNW:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraOV7670/datasheet/.goutputstream-ZL6RNW
--------------------------------------------------------------------------------
/CameraOV7670/datasheet/AL422B_Data_Sheets.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraOV7670/datasheet/AL422B_Data_Sheets.pdf
--------------------------------------------------------------------------------
/CameraOV7670/datasheet/Atmega168PinMap2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraOV7670/datasheet/Atmega168PinMap2.png
--------------------------------------------------------------------------------
/CameraOV7670/datasheet/OV7670 Arduino pins.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraOV7670/datasheet/OV7670 Arduino pins.pdf
--------------------------------------------------------------------------------
/CameraOV7670/datasheet/camera_pins.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraOV7670/datasheet/camera_pins.pdf
--------------------------------------------------------------------------------
/CameraOV7670/datasheet/datasheet.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraOV7670/datasheet/datasheet.pdf
--------------------------------------------------------------------------------
/CameraOV7670/datasheet/description.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraOV7670/datasheet/description.pdf
--------------------------------------------------------------------------------
/CameraOV7670/datasheet/img.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraOV7670/datasheet/img.jpg
--------------------------------------------------------------------------------
/CameraOV7670/datasheet/ov7670.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraOV7670/datasheet/ov7670.jpg
--------------------------------------------------------------------------------
/CameraOV7670/datasheet/ov7670_camera_sensor_success.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraOV7670/datasheet/ov7670_camera_sensor_success.pdf
--------------------------------------------------------------------------------
/CameraVC0706/CameraVC0706.cpp:
--------------------------------------------------------------------------------
1 | #include "CameraVC0706.h"
2 |
3 | #if VC0760_DEBUG == 1
4 | CameraVC0706::CameraVC0706(HardwareSerial *serial, Stream *debug) :
5 | serial(serial), debug(debug) {
6 | rxBufferPointer = 0;
7 | serialNumber = 0x00;
8 | framePointer = 0;
9 | }
10 | #else
11 | CameraVC0706::CameraVC0706(HardwareSerial *serial) : serial(serial) {
12 | rxBufferPointer = 0;
13 | serialNumber = 0x00;
14 | framePointer = 0;
15 | }
16 | #endif
17 |
18 | bool CameraVC0706::begin(long baud) {
19 | serial->begin(baud);
20 | return true;
21 | }
22 |
23 | bool CameraVC0706::close() {
24 | serial->end();
25 | return true;
26 | }
27 |
28 | bool CameraVC0706::capture() {
29 | return executeBufferControl(STOP_CURRENT_FRAME);
30 | }
31 |
32 | bool CameraVC0706::resume() {
33 | return executeBufferControl(RESUME_FRAME);
34 | }
35 |
36 | bool CameraVC0706::executeBufferControl(unsigned char control) {
37 | unsigned char args[] = { (unsigned char) (control & 0x03) };
38 | return executeCommand(FBUF_CTRL, args, sizeof(args), 5);
39 | }
40 |
41 | unsigned int CameraVC0706::readFrame(unsigned char *buf,
42 | unsigned int frameOffset, unsigned int bufferOffset,
43 | unsigned int len) {
44 | unsigned int bytesRead = 0;
45 | unsigned char args[] = { 0x00, 0x0a, 0x00, 0x00,
46 | (unsigned char) ((frameOffset >> 8) & 0xff),
47 | (unsigned char) (frameOffset & 0xff), 0x00, 0x00,
48 | (unsigned char) ((len >> 8) & 0xff), (unsigned char) (len
49 | & 0xff), (VC0760_CAMERA_DELAY >> 8) & 0xff,
50 | VC0760_CAMERA_DELAY & 0xff };
51 |
52 | if (!executeCommand(READ_FBUF, args, sizeof(args), 5)) {
53 | return 0;
54 | }
55 | while (bytesRead < len) {
56 | delay(10);
57 | bytesRead += read(&buf[bufferOffset + bytesRead],
58 | len - bytesRead);
59 | }
60 | readResponse(5);
61 | return bytesRead;
62 | }
63 |
64 | bool CameraVC0706::setDownSize(unsigned char widthDownSize,
65 | unsigned char heightDownSize) {
66 | unsigned char args[] = { (unsigned char) ((widthDownSize & 0x03)
67 | | ((heightDownSize << 2) & 0x0c)) };
68 | return executeCommand(DOWNSIZE_CTRL, args, sizeof(args), 5);
69 | }
70 |
71 | unsigned char CameraVC0706::getDownSize() {
72 | unsigned char args[] = { };
73 | bool run = executeCommand(DOWNSIZE_STATUS, args, sizeof(args), 6);
74 | if (run) {
75 | return 0;
76 | }
77 | return rxBuffer[5];
78 | }
79 |
80 | unsigned int CameraVC0706::getFrameLength() {
81 | unsigned int frameLength = 0;
82 | unsigned char args[] = { 0x00 };
83 | if (!executeCommand(GET_FBUF_LEN, args, sizeof(args), 9)
84 | && rxBuffer[4] == 0x04) {
85 | return 0;
86 | }
87 | frameLength |= rxBuffer[7];
88 | frameLength <<= 8;
89 | frameLength |= rxBuffer[8];
90 | return frameLength;
91 | }
92 |
93 | bool CameraVC0706::setHorizontalMirror(unsigned char by,
94 | unsigned char mirrorMode) {
95 | unsigned char args[] = { (unsigned char) (by & 0x01),
96 | (unsigned char) (mirrorMode & 0x01) };
97 | return executeCommand(MIRROR_CTRL, args, sizeof(args), 5);
98 | }
99 |
100 | unsigned char CameraVC0706::getHorizontalMirrorStatus() {
101 | unsigned char args[] = { };
102 | bool run = executeCommand(MIRROR_STATUS, args, sizeof(args), 7);
103 | unsigned char status = 0;
104 | if (run) {
105 | status = (rxBuffer[6] & 0x01) | ((rxBuffer[5] << 1) & 0x02);
106 | }
107 | return status;
108 | }
109 |
110 | bool CameraVC0706::setColorControl(unsigned char by,
111 | unsigned char colorControlMode) {
112 | unsigned char args[] = { (unsigned char) (by & 0x01),
113 | (unsigned char) (colorControlMode & 0x01) };
114 | return executeCommand(COLOR_CTRL, args, sizeof(args), 5);
115 | }
116 |
117 | unsigned char CameraVC0706::getColorControlStatus() {
118 | unsigned char args[] = { };
119 | bool run = executeCommand(COLOR_STATUS, args, sizeof(args), 8);
120 | unsigned char status = 0;
121 | if (run) {
122 | status = (rxBuffer[5] & 0x01) | ((rxBuffer[6] << 2) & 0x06);
123 | }
124 | return status;
125 | }
126 |
127 | bool CameraVC0706::setOutputResolution(unsigned char resolution) {
128 | unsigned char args[] = { 0x04, 0x01, 0x00, 0x19, resolution };
129 | return executeCommand(WRITE_DATA, args, sizeof(args), 5);
130 | }
131 |
132 | bool CameraVC0706::setMotionMonitoring(bool monitor) {
133 | unsigned char args[] = { (unsigned char) monitor };
134 | return executeCommand(COMM_MOTION_CTRL, args, sizeof(args), 5);
135 | }
136 |
137 | bool CameraVC0706::getMotionMonitoringStatus() {
138 | unsigned char args[] = { };
139 | return (executeCommand(COMM_MOTION_STATUS, args, sizeof(args), 6))
140 | && rxBuffer[5];
141 | }
142 |
143 | bool CameraVC0706::pollMotionMonitoring(unsigned int timeout,
144 | void (*callback)(void *)) {
145 | long start = 0;
146 | bool detected = false;
147 | start = millis();
148 | do {
149 | if (readResponse(5) > 0) {
150 | detected = verifyResponse(COMM_MOTION_DETECTED);
151 | }
152 | if (detected && callback != 0) {
153 | callback(this);
154 | }
155 | } while (!detected && ((millis() - start) < timeout));
156 | return detected;
157 | }
158 |
159 | bool CameraVC0706::setMotionControl(unsigned char motionControl,
160 | unsigned char param0, unsigned char param1) {
161 | unsigned char args[] = { motionControl, param0, param1 };
162 | return executeCommand(MOTION_CTRL, args, sizeof(args), 5);
163 | }
164 |
165 | unsigned int CameraVC0706::write(unsigned char *buf,
166 | unsigned int size) {
167 | unsigned int txLength = 0;
168 |
169 | #if VC0760_DEBUG == 1
170 | debug->print("About to write: ");
171 | debug->print(size);
172 | debug->println(" bytes.");
173 | #endif
174 |
175 | txLength = serial->write(&buf[0], size);
176 |
177 | #if VC0760_DEBUG == 1
178 | if (txLength < 0) {
179 | debug->println("UART TX error.");
180 | } else if (txLength != size) {
181 | debug->print("Sent bytes ");
182 | debug->print(txLength);
183 | debug->print(" differs from the size to be send ");
184 | debug->println(size);
185 | }
186 | #endif
187 |
188 | return txLength;
189 | }
190 |
191 | unsigned int CameraVC0706::read(unsigned char *buf, unsigned int size) {
192 | unsigned char c = 0;
193 | unsigned int rxLength = 0;
194 | unsigned char count = size;
195 | while (count-- > 0 && serial->available()
196 | && (c = serial->read()) != -1) {
197 | buf[rxLength++] = c;
198 | }
199 |
200 | #if VC0760_DEBUG == 1
201 | if (c < 0) {
202 | debug->println("Error on read.");
203 | } else if (rxLength == 0) {
204 | debug->println("No data received on read.");
205 | } else if (rxLength != size) {
206 | debug->print("Read bytes: ");
207 | debug->print(rxLength);
208 | debug->print(" differs from the size to be read: ");
209 | debug->println(size);
210 | } else {
211 | debug->print("It matches! ");
212 | debug->print(rxLength);
213 | debug->print(" bytes read when expecting: ");
214 | debug->println(size);
215 | }
216 | #endif
217 |
218 | return rxLength;
219 | }
220 |
221 | bool CameraVC0706::executeCommand(unsigned char cmd,
222 | unsigned char *args, unsigned char argc,
223 | unsigned int responseLength) {
224 | if (!sendCommand(cmd, args, argc)) {
225 | return false;
226 | }
227 | delay(50);
228 | if (!readResponse(responseLength)) {
229 | return false;
230 | }
231 | if (!verifyResponse(cmd)) {
232 | return false;
233 | }
234 | return true;
235 | }
236 |
237 | unsigned int CameraVC0706::sendCommand(unsigned char cmd,
238 | unsigned char *args, unsigned int argc) {
239 | unsigned int sentBytes = 0;
240 | unsigned int bufSize = 4 + argc;
241 | unsigned char buf[bufSize];
242 | buf[0] = VC0760_PROTOCOL_SIGN_TX;
243 | buf[1] = serialNumber;
244 | buf[2] = cmd;
245 | buf[3] = argc;
246 | memcpy(&buf[4], args, argc);
247 | #if VC0760_DEBUG == 1
248 | printBuff(buf, bufSize);
249 | #endif
250 | sentBytes = write(buf, bufSize);
251 |
252 | #if VC0760_DEBUG == 1
253 | debug->print(sentBytes);
254 | debug->println(" bytes written.");
255 | #endif
256 |
257 | if (sentBytes != bufSize) {
258 |
259 | #if VC0760_DEBUG == 1
260 | debug->print("Sent different amount than expected: ");
261 | debug->println(bufSize);
262 | #endif
263 |
264 | return 0;
265 | }
266 | return sentBytes;
267 | }
268 |
269 | bool CameraVC0706::verifyResponse(unsigned char cmd) {
270 | if ((rxBuffer[0] != VC0760_PROTOCOL_SIGN_RX)
271 | || (rxBuffer[1] != serialNumber) || (rxBuffer[2] != cmd)
272 | || (rxBuffer[3] != 0x00)) {
273 | return false;
274 | }
275 | return true;
276 | }
277 |
278 | unsigned int CameraVC0706::readResponse(unsigned int length) {
279 | rxBufferPointer = read(rxBuffer, length);
280 | #if VC0760_DEBUG == 1
281 | printBuff(rxBuffer, rxBufferPointer);
282 | #endif
283 | return rxBufferPointer;
284 | }
285 |
286 | #if VC0760_DEBUG == 1
287 | void CameraVC0706::printBuff(unsigned char *buf, unsigned int c) {
288 | debug->println("Printing buffer:");
289 | for (unsigned int i = 0; i < c; i++) {
290 | debug->print(i);
291 | debug->print(" : ");
292 | debug->println(buf[i], HEX);
293 | }
294 | }
295 | #endif
296 |
297 | bool CameraVC0706::reset() {
298 | unsigned char args[] = { };
299 | bool run = executeCommand(SYSTEM_RESET, args, sizeof(args), 5);
300 |
301 | #if VC0760_DEBUG == 1
302 | if (run) {
303 | debug->println("Waiting the system to reset.");
304 | delay(10);
305 | }
306 | #endif
307 |
308 | return run;
309 | }
310 |
311 | float CameraVC0706::getVersion() {
312 | unsigned int i = 0;
313 | float version = 0.0;
314 | unsigned char args[] = { };
315 | if (!executeCommand(GEN_VERSION, args, sizeof(args), 16)) {
316 | return version;
317 | }
318 | while (rxBuffer[i++] != ' ')
319 | ;
320 | version += rxBuffer[i] - '0';
321 | version += 0.1 * (rxBuffer[i + 2] - '0');
322 | return version;
323 | }
324 |
325 | bool CameraVC0706::setOsdCharacters(unsigned char x, unsigned char y,
326 | unsigned char *str, unsigned char len) {
327 | if (len > 14) {
328 | len = 14;
329 | }
330 | unsigned char args[2 + len];
331 | args[0] = len;
332 | args[1] = ((x << 6) & 0x60) | (y & 0x1f);
333 | memcpy(&args[2], str, len);
334 | return executeCommand(OSD_ADD_CHAR, args, sizeof(args), 5);
335 | }
336 |
337 | bool CameraVC0706::setCompression(unsigned char compression) {
338 | unsigned char args[] = { 0x01, 0x01, 0x12, 0x04, compression };
339 | return executeCommand(WRITE_DATA, args, sizeof(args), 5);
340 | }
341 |
342 | unsigned char CameraVC0706::getCompression() {
343 | unsigned char args[] = { 0x01, 0x01, 0x12, 0x04 };
344 | bool run = executeCommand(READ_DATA, args, sizeof(args), 6);
345 | unsigned char compression = 0;
346 | if (run) {
347 | compression = rxBuffer[5];
348 | }
349 | return compression;
350 | }
351 |
352 | bool CameraVC0706::setTVOutput(unsigned char onOff) {
353 | unsigned char args[] = { (unsigned char) (onOff & 0x01) };
354 | return executeCommand(TV_OUT_CTRL, args, sizeof(args), 5);
355 | }
356 |
357 | bool CameraVC0706::setBoudRate(long baudRate) {
358 | this->baudRate = baudRate;
359 | unsigned char args[] = { 0x01, (unsigned char) ((baudRate >> 8)
360 | & 0xff), (unsigned char) (baudRate & 0xff) };
361 | return executeCommand(SET_PORT, args, sizeof(args), 5);
362 | }
363 |
--------------------------------------------------------------------------------
/CameraVC0706/datasheet/0libArduinoCamera.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraVC0706/datasheet/0libArduinoCamera.a
--------------------------------------------------------------------------------
/CameraVC0706/datasheet/VC0706protocol.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraVC0706/datasheet/VC0706protocol.pdf
--------------------------------------------------------------------------------
/CameraVC0706/datasheet/libArduinoCamera.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraVC0706/datasheet/libArduinoCamera.a
--------------------------------------------------------------------------------
/CameraVC0706/example/interacting/interacting.ino:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 | #include
6 |
7 | void showUsage(SoftwareSerial *out, unsigned char section) {
8 | switch(section) {
9 | case 0:
10 | out->println("'T' > TV off/on.");
11 | out->println("'o' > Output Resolution.");
12 | out->println("'t' > Take a Picture.");
13 | out->println("'M' > Set Motion Monitoring.");
14 | out->println("'m' > Get Motion Monitoring.");
15 | out->println("'d' > Detect Monitoring.");
16 | out->println("'H' > Set Horizontal Mirror Status.");
17 | out->println("'h' > Get Horizontal Mirror Status.");
18 | out->println("'r' > Reset.");
19 | out->println("'I' > Set Image Compression.");
20 | out->println("'i' > Get Image Compression.");
21 | out->println("'v' > Version.");
22 | break;
23 | case 1:
24 | out->println("TV:");
25 | out->println("'0' > On.");
26 | out->println("'1' > Off.");
27 | break;
28 | case 2:
29 | out->println("Output Output Resolution:");
30 | out->println("'0' > 160x120.");
31 | out->println("'1' > 320x240.");
32 | out->println("'2' > 640x480.");
33 | break;
34 | case 3:
35 | out->println("Set Motion Monitoring:");
36 | out->println("'0' > On.");
37 | out->println("'1' > Off.");
38 | break;
39 | case 4:
40 | out->println("Set Horizontal Mirror Status:");
41 | out->println("'0' > On.");
42 | out->println("'1' > Off.");
43 | break;
44 | case 5:
45 | out->println("Set Image Compression:");
46 | out->println("'0..10' > n * 10.");
47 | break;
48 | }
49 |
50 | }
51 |
52 | unsigned char readParam(SoftwareSerial *in) {
53 | unsigned char op = 0;
54 | in->print("#> ");
55 | while(!in->available());
56 | op = in->read();
57 | while(in->available() && in->read());
58 | return op;
59 | }
60 |
61 | void captureAndSave(CameraVC0706 *cam) {
62 | File imageFile;
63 | imageFile = SD.open("photo.jpg", FILE_WRITE);
64 | imageFile.seek(0);
65 | cam->executeBufferControl(CameraVC0706::RESUME_FRAME);
66 | delay(10);
67 | if (cam->capture()) {
68 | unsigned int frameLength = cam->getFrameLength();
69 | unsigned char b[64];
70 | unsigned int remaining, done = 0;
71 | unsigned int readFremeLength = 0;
72 | while (done < frameLength) {
73 | remaining = frameLength - done;
74 | readFremeLength = cam->readFrame(b, done, done, (remaining < 64) ? remaining : 64);
75 | imageFile.write(b, readFremeLength);
76 | done += readFremeLength;
77 | }
78 | }
79 | imageFile.close();
80 | }
81 |
82 | void setup() {
83 | SoftwareSerial serial(6, 7);
84 | CameraVC0706 cam(&Serial, &serial);
85 | serial.begin(115200);
86 | cam.begin(115200);
87 | serial.println("Camera initialized.");
88 | //if (!SD.begin(4)) {
89 | // serial.println("Initialization failed!");
90 | // return;
91 | //}
92 | serial.println("Initialization done.");
93 | unsigned char c, arg0, arg1;
94 | while (true) {
95 | showUsage(&serial, 0);
96 | unsigned char arg0 = readParam(&serial);
97 |
98 | switch (arg0) {
99 |
100 | case 'T':
101 | showUsage(&serial, 1);
102 | arg1 = readParam(&serial);
103 | c = (arg1 == '1') ? 1 : 0;
104 | serial.println(cam.setTVOutput(c) ? "OK" : "Error");
105 | break;
106 |
107 | case 'o':
108 | showUsage(&serial, 2);
109 | arg1 = readParam(&serial);
110 | switch(arg1) {
111 | case '0':
112 | c = CameraVC0706::RES_160X120;
113 | break;
114 | case '1':
115 | c = CameraVC0706::RES_320X240;
116 | break;
117 | case '2':
118 | c = CameraVC0706::RES_640X480;
119 | break;
120 | default:
121 | c = CameraVC0706::RES_160X120;
122 | }
123 | serial.println(cam.setOutputResolution(c) ? "OK" : "Error");
124 | break;
125 |
126 | case 't':
127 | captureAndSave(&cam);
128 | serial.println("Soon!");
129 | break;
130 |
131 | case 'M':
132 | showUsage(&serial, 3);
133 | arg1 = readParam(&serial);
134 | c = (arg1 == '1') ? 1 : 0;
135 | serial.println(cam.setMotionMonitoring(c) ? "OK" : "Error");
136 | break;
137 |
138 | case 'm':
139 | serial.println(cam.getMotionMonitoringStatus());
140 | break;
141 |
142 | case 'd':
143 | serial.println("Soon!");
144 | break;
145 |
146 | case 'H':
147 | showUsage(&serial, 4);
148 | arg1 = readParam(&serial);
149 | c = (arg1 == '1') ? 1 : 0;
150 | serial.println(cam.setHorizontalMirror(CameraVC0706::UART, c) ? "OK" : "Error");
151 | break;
152 |
153 | case 'h':
154 | serial.println(cam.getHorizontalMirrorStatus());
155 | break;
156 |
157 | case 'r':
158 | serial.println(cam.reset() ? "OK" : "Error");
159 | break;
160 |
161 | case 'I':
162 | showUsage(&serial, 5);
163 | arg1 = readParam(&serial);
164 | c = arg1 - '0';
165 | serial.println(cam.setCompression(c*10) ? "OK" : "Error");
166 | break;
167 |
168 | case 'i':
169 | serial.println(cam.getCompression());
170 | break;
171 |
172 | case 'v':
173 | serial.println(cam.getVersion());
174 | break;
175 |
176 | default:
177 | serial.println("Not understood.");
178 | }
179 | }
180 | }
181 |
182 | void loop() {
183 | }
184 |
--------------------------------------------------------------------------------
/CameraVC0706/example/simple_snap/a.out:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/CameraVC0706/example/simple_snap/a.out
--------------------------------------------------------------------------------
/CameraVC0706/example/simple_snap/simple_snap.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 | void showUsage(SoftwareSerial *out, unsigned char section) {
9 | switch(section) {
10 | case 0:
11 | out->println("'T' > TV off/on.");
12 | out->println("'o' > Output Resolution.");
13 | out->println("'t' > Take a Picture.");
14 | out->println("'M' > Set Motion Monitoring.");
15 | out->println("'m' > Get Motion Monitoring.");
16 | out->println("'d' > Detect Monitoring.");
17 | out->println("'H' > Set Horizontal Mirror Status.");
18 | out->println("'h' > Get Horizontal Mirror Status.");
19 | out->println("'r' > Reset.");
20 | out->println("'I' > Set Image Compression.");
21 | out->println("'i' > Get Image Compression.");
22 | out->println("'v' > Version.");
23 | break;
24 | case 1:
25 | out->println("TV:");
26 | out->println("'0' > On.");
27 | out->println("'1' > Off.");
28 | break;
29 | case 2:
30 | out->println("Output Output Resolution:");
31 | out->println("'0' > 160x120.");
32 | out->println("'1' > 320x240.");
33 | out->println("'2' > 640x480.");
34 | break;
35 | case 3:
36 | out->println("Set Motion Monitoring:");
37 | out->println("'0' > On.");
38 | out->println("'1' > Off.");
39 | break;
40 | case 4:
41 | out->println("Set Horizontal Mirror Status:");
42 | out->println("'0' > On.");
43 | out->println("'1' > Off.");
44 | break;
45 | case 5:
46 | out->println("Set Image Compression:");
47 | out->println("'1..9' > n * 10.");
48 | break;
49 | }
50 |
51 | }
52 |
53 | unsigned char readParam(SoftwareSerial *in) {
54 | unsigned char op = 0;
55 | while(!in->available());
56 | op = in->read();
57 | while(in->available()) {
58 | in->read();
59 | }
60 | return op;
61 | }
62 |
63 | void setup() {
64 | SoftwareSerial serial(2, 3);
65 | CameraVC0706 cam(&Serial, &serial);
66 | serial.begin(115200);
67 | cam.begin(115200);
68 | serial.println("Camera initialized.");
69 | unsigned char c, arg0, arg1;
70 | while (true) {
71 | showUsage(&serial, 0);
72 | arg0 = readParam(&serial);
73 |
74 | switch (arg0) {
75 |
76 | case 'T':
77 | showUsage(&serial, 1);
78 | arg1 = readParam(&serial);
79 | c = (arg1 == '1') ? 1 : 0;
80 | serial.println(cam.setTVOutput(c) ? "OK" : "Error");
81 | break;
82 |
83 | case 'o':
84 | showUsage(&serial, 2);
85 | arg1 = readParam(&serial);
86 | switch(arg1) {
87 | case '0':
88 | c = CameraVC0706::RES_160X120;
89 | break;
90 | case '1':
91 | c = CameraVC0706::RES_320X240;
92 | break;
93 | case '2':
94 | c = CameraVC0706::RES_640X480;
95 | break;
96 | default:
97 | c = CameraVC0706::RES_160X120;
98 | }
99 | serial.println(cam.setOutputResolution(c) ? "OK" : "Error");
100 | break;
101 |
102 | case 't':
103 | serial.println("Soon!");
104 | break;
105 |
106 | case 'M':
107 | showUsage(&serial, 3);
108 | arg1 = readParam(&serial);
109 | c = (arg1 == '1') ? 1 : 0;
110 | serial.println(cam.setMotionMonitoring(c) ? "OK" : "Error");
111 | break;
112 |
113 | case 'm':
114 | serial.println(cam.getMotionMonitoringStatus());
115 | break;
116 |
117 | case 'd':
118 | serial.println("Soon!");
119 | break;
120 |
121 | case 'H':
122 | showUsage(&serial, 4);
123 | arg1 = readParam(&serial);
124 | c = (arg1 == '1') ? 1 : 0;
125 | serial.println(cam.setHorizontalMirror(CameraVC0706::UART, c) ? "OK" : "Error");
126 | break;
127 |
128 | case 'h':
129 | serial.println(cam.getHorizontalMirrorStatus());
130 | break;
131 |
132 | case 'r':
133 | serial.println(cam.reset() ? "OK" : "Error");
134 | break;
135 |
136 | case 'I':
137 | showUsage(&serial, 5);
138 | arg1 = readParam(&serial);
139 | c = arg1 - '0';
140 | serial.println(cam.setCompression(c*10) ? "OK" : "Error");
141 | break;
142 |
143 | case 'i':
144 | serial.println(cam.getCompression());
145 | break;
146 |
147 | case 'v':
148 | serial.println(cam.getVersion());
149 | break;
150 |
151 | default:
152 | serial.println("Not understood.");
153 | }
154 | }
155 | }
156 |
157 | void loop() {
158 | }
159 |
--------------------------------------------------------------------------------
/Documentation.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/Documentation.pdf
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU LESSER GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 |
9 | This version of the GNU Lesser General Public License incorporates
10 | the terms and conditions of version 3 of the GNU General Public
11 | License, supplemented by the additional permissions listed below.
12 |
13 | 0. Additional Definitions.
14 |
15 | As used herein, "this License" refers to version 3 of the GNU Lesser
16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU
17 | General Public License.
18 |
19 | "The Library" refers to a covered work governed by this License,
20 | other than an Application or a Combined Work as defined below.
21 |
22 | An "Application" is any work that makes use of an interface provided
23 | by the Library, but which is not otherwise based on the Library.
24 | Defining a subclass of a class defined by the Library is deemed a mode
25 | of using an interface provided by the Library.
26 |
27 | A "Combined Work" is a work produced by combining or linking an
28 | Application with the Library. The particular version of the Library
29 | with which the Combined Work was made is also called the "Linked
30 | Version".
31 |
32 | The "Minimal Corresponding Source" for a Combined Work means the
33 | Corresponding Source for the Combined Work, excluding any source code
34 | for portions of the Combined Work that, considered in isolation, are
35 | based on the Application, and not on the Linked Version.
36 |
37 | The "Corresponding Application Code" for a Combined Work means the
38 | object code and/or source code for the Application, including any data
39 | and utility programs needed for reproducing the Combined Work from the
40 | Application, but excluding the System Libraries of the Combined Work.
41 |
42 | 1. Exception to Section 3 of the GNU GPL.
43 |
44 | You may convey a covered work under sections 3 and 4 of this License
45 | without being bound by section 3 of the GNU GPL.
46 |
47 | 2. Conveying Modified Versions.
48 |
49 | If you modify a copy of the Library, and, in your modifications, a
50 | facility refers to a function or data to be supplied by an Application
51 | that uses the facility (other than as an argument passed when the
52 | facility is invoked), then you may convey a copy of the modified
53 | version:
54 |
55 | a) under this License, provided that you make a good faith effort to
56 | ensure that, in the event an Application does not supply the
57 | function or data, the facility still operates, and performs
58 | whatever part of its purpose remains meaningful, or
59 |
60 | b) under the GNU GPL, with none of the additional permissions of
61 | this License applicable to that copy.
62 |
63 | 3. Object Code Incorporating Material from Library Header Files.
64 |
65 | The object code form of an Application may incorporate material from
66 | a header file that is part of the Library. You may convey such object
67 | code under terms of your choice, provided that, if the incorporated
68 | material is not limited to numerical parameters, data structure
69 | layouts and accessors, or small macros, inline functions and templates
70 | (ten or fewer lines in length), you do both of the following:
71 |
72 | a) Give prominent notice with each copy of the object code that the
73 | Library is used in it and that the Library and its use are
74 | covered by this License.
75 |
76 | b) Accompany the object code with a copy of the GNU GPL and this license
77 | document.
78 |
79 | 4. Combined Works.
80 |
81 | You may convey a Combined Work under terms of your choice that,
82 | taken together, effectively do not restrict modification of the
83 | portions of the Library contained in the Combined Work and reverse
84 | engineering for debugging such modifications, if you also do each of
85 | the following:
86 |
87 | a) Give prominent notice with each copy of the Combined Work that
88 | the Library is used in it and that the Library and its use are
89 | covered by this License.
90 |
91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license
92 | document.
93 |
94 | c) For a Combined Work that displays copyright notices during
95 | execution, include the copyright notice for the Library among
96 | these notices, as well as a reference directing the user to the
97 | copies of the GNU GPL and this license document.
98 |
99 | d) Do one of the following:
100 |
101 | 0) Convey the Minimal Corresponding Source under the terms of this
102 | License, and the Corresponding Application Code in a form
103 | suitable for, and under terms that permit, the user to
104 | recombine or relink the Application with a modified version of
105 | the Linked Version to produce a modified Combined Work, in the
106 | manner specified by section 6 of the GNU GPL for conveying
107 | Corresponding Source.
108 |
109 | 1) Use a suitable shared library mechanism for linking with the
110 | Library. A suitable mechanism is one that (a) uses at run time
111 | a copy of the Library already present on the user's computer
112 | system, and (b) will operate properly with a modified version
113 | of the Library that is interface-compatible with the Linked
114 | Version.
115 |
116 | e) Provide Installation Information, but only if you would otherwise
117 | be required to provide such information under section 6 of the
118 | GNU GPL, and only to the extent that such information is
119 | necessary to install and execute a modified version of the
120 | Combined Work produced by recombining or relinking the
121 | Application with a modified version of the Linked Version. (If
122 | you use option 4d0, the Installation Information must accompany
123 | the Minimal Corresponding Source and Corresponding Application
124 | Code. If you use option 4d1, you must provide the Installation
125 | Information in the manner specified by section 6 of the GNU GPL
126 | for conveying Corresponding Source.)
127 |
128 | 5. Combined Libraries.
129 |
130 | You may place library facilities that are a work based on the
131 | Library side by side in a single library together with other library
132 | facilities that are not Applications and are not covered by this
133 | License, and convey such a combined library under terms of your
134 | choice, if you do both of the following:
135 |
136 | a) Accompany the combined library with a copy of the same work based
137 | on the Library, uncombined with any other library facilities,
138 | conveyed under the terms of this License.
139 |
140 | b) Give prominent notice with the combined library that part of it
141 | is a work based on the Library, and explaining where to find the
142 | accompanying uncombined form of the same work.
143 |
144 | 6. Revised Versions of the GNU Lesser General Public License.
145 |
146 | The Free Software Foundation may publish revised and/or new versions
147 | of the GNU Lesser General Public License from time to time. Such new
148 | versions will be similar in spirit to the present version, but may
149 | differ in detail to address new problems or concerns.
150 |
151 | Each version is given a distinguishing version number. If the
152 | Library as you received it specifies that a certain numbered version
153 | of the GNU Lesser General Public License "or any later version"
154 | applies to it, you have the option of following the terms and
155 | conditions either of that published version or of any later version
156 | published by the Free Software Foundation. If the Library as you
157 | received it does not specify a version number of the GNU Lesser
158 | General Public License, you may choose any version of the GNU Lesser
159 | General Public License ever published by the Free Software Foundation.
160 |
161 | If the Library as you received it specifies that a proxy can decide
162 | whether future versions of the GNU Lesser General Public License shall
163 | apply, that proxy's public statement of acceptance of any version is
164 | permanent authorization for you to choose that version for the
165 | Library.
166 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | ARDUINO_LIB_PATH=/usr/share/arduino/libraries
2 | LIB_LIST=Camera CameraAL422B CameraOV7670 CameraVC0706
3 | SOURCE_PATH=`pwd`
4 |
5 | all:
6 | @echo "Use [install], [unistall] or [doc]"
7 |
8 | install:
9 | @echo "Instaling all libraries..."
10 | @for lib in $(LIB_LIST) ; do \
11 | ln -s $(SOURCE_PATH)/$$lib $(ARDUINO_LIB_PATH); \
12 | done
13 | @echo "done."
14 |
15 | uninstall:
16 | @echo "Uninstaling all libraries..."
17 | @for lib in $(LIB_LIST) ; do \
18 | rm -r $(ARDUINO_LIB_PATH)/$$lib ; \
19 | done
20 | @echo "done."
21 |
22 | doc:
23 | @echo "Running doxygen..."
24 | @rm -rf doc
25 | @mkdir doc
26 | doxygen doxygen.conf
27 | @cd doc/latex; make pdf; cp refman.pdf ../../Documentation.pdf
28 | @cd ../..
29 | @rm -rf doc
30 | @echo "done."
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Arduino Camera Driver
2 |
3 | [Documentation.pdf](Documentation.pdf)
4 |
--------------------------------------------------------------------------------
/nbproject/Package-Default.bash:
--------------------------------------------------------------------------------
1 | #!/bin/bash -x
2 |
3 | #
4 | # Generated - do not edit!
5 | #
6 |
7 | # Macros
8 | TOP=`pwd`
9 | CND_PLATFORM=GNU-Linux-x86
10 | CND_CONF=Default
11 | CND_DISTDIR=dist
12 | CND_BUILDDIR=build
13 | NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging
14 | TMPDIRNAME=tmp-packaging
15 | OUTPUT_PATH=MissingOutputInProject
16 | OUTPUT_BASENAME=MissingOutputInProject
17 | PACKAGE_TOP_DIR=camera/
18 |
19 | # Functions
20 | function checkReturnCode
21 | {
22 | rc=$?
23 | if [ $rc != 0 ]
24 | then
25 | exit $rc
26 | fi
27 | }
28 | function makeDirectory
29 | # $1 directory path
30 | # $2 permission (optional)
31 | {
32 | mkdir -p "$1"
33 | checkReturnCode
34 | if [ "$2" != "" ]
35 | then
36 | chmod $2 "$1"
37 | checkReturnCode
38 | fi
39 | }
40 | function copyFileToTmpDir
41 | # $1 from-file path
42 | # $2 to-file path
43 | # $3 permission
44 | {
45 | cp "$1" "$2"
46 | checkReturnCode
47 | if [ "$3" != "" ]
48 | then
49 | chmod $3 "$2"
50 | checkReturnCode
51 | fi
52 | }
53 |
54 | # Setup
55 | cd "${TOP}"
56 | mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package
57 | rm -rf ${NBTMPDIR}
58 | mkdir -p ${NBTMPDIR}
59 |
60 | # Copy files and create directories and links
61 | cd "${TOP}"
62 | makeDirectory "${NBTMPDIR}/camera"
63 | copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
64 |
65 |
66 | # Generate tar file
67 | cd "${TOP}"
68 | rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/camera.tar
69 | cd ${NBTMPDIR}
70 | tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/camera.tar *
71 | checkReturnCode
72 |
73 | # Cleanup
74 | cd "${TOP}"
75 | rm -rf ${NBTMPDIR}
76 |
--------------------------------------------------------------------------------
/nbproject/configurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Camera.cpp
7 | Camera.h
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | DigitalWriteFast.h
17 |
18 |
19 | MIN_at_Camera.cpp
20 | MIN_at_Camera.h
21 |
22 |
23 | MIN_at_DS1307.cpp
24 | MIN_at_DS1307.h
25 |
26 |
27 | MIN_at_TC74.cpp
28 | MIN_at_TC74.h
29 |
30 |
31 | MIN_at_Tools.cpp
32 | MIN_at_Tools.h
33 |
34 |
35 |
36 |
37 | Base64.ino
38 | Bitmap.ino
39 | Camera.ino
40 | DS1307.ino
41 | TC74.ino
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | CameraAL422B.cpp
61 | CameraAL422B.h
62 |
63 |
64 |
65 |
66 | CameraOV7670.cpp
67 | CameraOV7670.h
68 |
69 |
70 |
74 | Makefile
75 |
76 |
77 | ^(nbproject)$
78 |
79 | .
80 |
81 | Makefile
82 |
83 |
84 |
85 | LOCAL_SOURCES
86 | default
87 |
88 |
89 |
90 |
91 |
92 | .
93 | ${MAKE} -f Makefile
94 | ${MAKE} -f Makefile clean
95 |
96 |
97 |
98 | /usr/share/arduino/libraries/Wire
99 | /usr/share/arduino/hardware/arduino/cores/arduino
100 | ../../library/io
101 | ../../library/io/OutputStream
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
--------------------------------------------------------------------------------
/nbproject/private/Default.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dalmirdasilva/ArduinoCamera/ad0e95d77bfff5bb04f1147a77c6090db5318b6c/nbproject/private/Default.properties
--------------------------------------------------------------------------------
/nbproject/private/configurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Makefile
4 |
5 |
6 |
7 | localhost
8 | 2
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | gdb
24 |
25 |
26 |
27 | "${OUTPUT_PATH}"
28 |
29 | "${OUTPUT_PATH}"
30 | .
31 | true
32 | 0
33 | 0
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/nbproject/private/private.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | true
5 |
6 |
7 | 0
8 | 0
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/nbproject/project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.netbeans.modules.cnd.makeproject
4 |
5 |
6 | camera
7 |
8 | cpp,ino
9 | h
10 | UTF-8
11 |
12 |
13 | .
14 |
15 |
16 |
17 | Default
18 | 0
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------