For one week from the last download my Justbasic GUI will be available from Upload'r for camera control.
It's set on COM2 @ n2400 you'll be able to change the code to suit your self if you download Justbasic.
My setup uses a Tx 433MHz to send commands.
http://file.uploadr.com/4cad <A href='http://file.uploadr.com/4cad' Target=_Blank>External Web Link</a>
<code><pre><font size=2>' pin0 = Sertxd - PC '(output only)
' pin1 = LED '(input/output)
' pin2 = Servo U/D '(input/output)
' pin3 = Rx '(input only)
' pin4 = Servo R/L '(input/output)
Symbol command = b0
init:
dirs = %10110
gosub home
returnpoint1:
main:
pause 250
low 1
serin 3,n2400, ("CAM"
,command
'sertxd (command,CR,LF) 'for testing only
high 1
if command = "U" then tiltup
if command = "D" then tiltdown
if command = "L" then panleft
if command = "R" then panright
if command = "H" then homesub
goto main
tiltup:
let b2 = b2 - 2 min 30 'my servo must be a little out of whack.
servo 2,b2
pause 50
goto main
tiltdown:
let b2 = b2 + 2 max 200
servo 2,b2
pause 50
goto main
panleft:
let b4 = b4 + 2 max 190
servo 4,b4
pause 50
goto main
panright:
let b4 = b4 - 2 min 20
servo 4,b4
pause 50
goto main
homesub:
gosub home
goto returnpoint1
home:
let b2 = 116 'preset position
let b4 = 106
servo 2,b2
servo 4,b4
pause 50
return </font></pre></code>
Adjust servo min & max to suit your own.
Please make the proper connections when interfacing with your PC. Don't forget if using 08/08M input 3 a diode is required.
Edited by - tarzan on 1/12/2006 10:58:01 AM