constantly and stopping the pan every time the sensor detects
something. The scanning and analysis of the scan are oEvents (where
the scanning is activated by ooPIC.Hz1 for the time being), while the
current panning code is below (and in the main subprocedure):
Do
Servo=10 ' Turn to roughly 30 degrees
ooPIC.Delay=2000
Servo=53 'Turn to 150 degrees
ooPIC.Delay=2000
Loop
The code is functional, but there are a number of kinks I'm
still trying to work out. For one thing, I'm almost positive the way
I'm controlling the servo can be done more efficiently, but I'm not
sure how:
-Right now the speed of the pan is fairly fast. I know oServoSP will
allow for speed adjustments, but the servo has limits (it can turn
past these limits, apparently, but makes very angry grinding noises
beyond a certain point). In addition, the angle of the pan is
important, although I'd be willing to sacrifice a little accuracy as
long as it doesn't start shifting its pan range in a circle. Is there
a way to adjust the speed with oServo, or to adapt oServoSP for my needs?
-Checking the sensor once per second is kind of slow for what we're
trying to do. That's not a problem - I've figured out how to use
oClock to change the timing of the sensing. This problem arose for
more frequent checks. Every time the servo stops in the middle of its
arc on the detection and then begins moving again, it restarts the
do-loop code. This means it is moving in a larger arc than 120
degrees, which eventually means grinding noises and the sensor begins
to turn around to look in the complete opposite direction of where
it's supposed to. Is there a way around this, so that the servo pauses
in the middle of its arc instead of restarting?
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/oopic/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/oopic/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
No comments:
Post a Comment