You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,11 @@
8
8
9
9
Hello, this is an Arduino library designed to control Pelco Cameras!
10
10
11
-
For now it can support PELCO-D protocol but I havn't got tested everything yet.
11
+
For now it can support **PELCO-D** protocol but I havn't got tested everything yet.
12
12
13
13
This library was made for the project: [Controlling a cctv camera on Arduino](https://hackaday.io/project/183986-controlling-a-cctv-camera-with-arduino) on hacakday.io
14
14
15
-
Before you go on, this is a school, project, I'm still in school and learnings things so be kind if the libray is ugly. I would like to thanks my school and teachers for allowing me to work on this project.
15
+
*Before you go on, this is a school, project, I'm still in school and learnings things so be kind if the libray is ugly. I would like to thanks my school and teachers for allowing me to work on this project.*
16
16
17
17
The main goal of the project is to do a control table (It'll be on arduino.)
#defineSET_FOCUS_SPEED 0x27 // Param from 00 to 03
68
+
69
+
#defineRESET 0x29
70
+
71
+
#defineAUTO_FOCUS 0x2B // Param from 00 to 02 (auto/on/off)
72
+
#defineAUTO_IRIS 0x2D // Param from 00 to 02 (auto/on/off)
73
+
#defineAUTO_AGC 0x2F // Param from 00 to 02 (auto/on/off)
74
+
#defineBACKLIGHT_COMPENSATION 0x31 // Param from 00 to 01 (on/off)
75
+
#defineAUTO_WHITE_BALANCE 0x33 // Param from 00 to 01 (on/off)
76
+
77
+
#defineQUERY 0x45 //???????????
78
+
79
+
#defineZERO_POS 0x49
80
+
#defineSET_PAN 0x4B // b5: MSB and b6: LSB
81
+
#defineSET_TILT 0x4D // b5: MSB and b6: LSB
82
+
#defineSET_ZOOM 0x4F // b5: MSB and b6: LSB
83
+
84
+
#defineQUERY_PAN 0x51
85
+
#defineQUERY_TILT 0x53
86
+
#defineQUERY_ZOOM 0x55
87
+
88
+
#defineRESP_PAN 0x59 // b5: MSB and b6: LSB
89
+
#defineRESP_TILT 0x5B // b5: MSB and b6: LSB
90
+
#defineRESP_ZOOM 0x5D // b5: MSB and b6: LSB
44
91
45
92
/*
46
93
47
-
A lot of commands is not implemented yet, I'll do it in the future!
94
+
A lot of commands is not implemented yet, it is not "important" commands for now message me via github if you wanna get
95
+
a command
48
96
*/
97
+
//Special commands:
98
+
99
+
constPROGMEMbyteCMND1[5] = {FOCUS_N, IRIS_O, IRIS_C, OFF, ON}; //List of all commands that go on the byte3; a list with command 2 is not required, a bit of logic please
100
+
101
+
constPROGMEMbyteSETPOS[3] = {SET_PAN, SET_TILT, SET_ZOOM}; //List of all command that require an MSB and LSB
102
+
103
+
constPROGMEMbyteDATA1[2] = {PAN_L, PAN_R}; //List of all commands that use ONLY the DATA1 for data pass
104
+
constPROGMEMbyteDATA_BOTH[5]= {PAN_L_TILT_D, PAN_L_TILT_U, PAN_R_TILT_D, PAN_R_TILT_U, WRITE_CHAR};//List of all commands that use the DATA1 and DATA2 for data pass (excluding the SETPOS' commands)
105
+
106
+
constPROGMEMbytePRESET_CMND[3] = {SET_PRESET, CLR_PRESET, GOTO_PRESET}; //will I use it?
0 commit comments