/* Bubble Code */
oDCMotor bubble_motor = New oDCMotor;
oDIO1 bubble_fc_sensor1 = New oDIO1;
oDIO1 bubble_fc_sensor2 = New oDIO1;
Byte bubble_speed;
Byte bubble_stop_time;
Sub Void Main(Void)
{
bubble_speed = 255;
bubble_stop_time = 400;
initialize;
While(1)
{
If((bubble_fc_sensor1 == cvOn) & (bubble_fc_sensor2
== cvOn))
{
bubble_motor.Value = bubble_speed;
bubble_motor.Brake = cvOn;
ooPIC.Delay = 25;
bubble_motor.Brake = cvOff;
ooPIC.Delay = 50;
}
}
}
Sub Void initialize(Void)
{
ooPIC.Node = 3;
bubble_motor.IOLineP = 18;
bubble_motor.IOLineB = 24;
bubble_motor.IOLineD = 26;
bubble_motor.Operate = 1;
bubble_motor.Direction = 1;
bubble_motor.Unsigned = 1;
bubble_motor.Value = bubble_speed;
bubble_motor.PreScale = 3;
bubble_motor.Brake = cvOff;
bubble_fc_sensor1.IOLine = 12;
bubble_fc_sensor1.Direction = cvInput;
bubble_fc_sensor2.IOLine = 13;
bubble_fc_sensor2.Direction = cvInput;
}
--- In oopic@yahoogroups.com, "Darrell" <videogrfx@...> wrote:
>
> Ted,
> You old hamburger! Write me off list. Yes, it is the same project
but OOpic will only be
> used for one simple part of the bot now. A lot has changed.
Everything seems to be
> working so it must be the code. The motor turns but is ignoring the
opto sensors. Tested
> those and they're working. My next step was to try a sample program
as u suggested. I'll
> post the code I'm noodling.
> Darrell
>
> --- In oopic@yahoogroups.com, "theo570" <theo570@> wrote:
> >
> >
> > Darrell,
> >
> > If you are sure it is a code issue ie all connections have been
checked
> > as well as logic and motor power then the first thing to do is
post your
> > code here for us to see.
> >
> > If this is the project I assisted you with several years ago, I
may
> > still have source code on my PC.
> >
> > A test you could perform would be to open a new code window and
launch
> > the Sample program for the oDCMotorMGD. Alter the code to reflect
your
> > pinouts etc.. and compile. If this is on the project I think it is
> > PLEASE break out a floor jack and get that thing off the ground.
It
> > would really suck to have a several hundred pound robot on the
loose in
> > the house...
> >
> > Good Luck.
> >
> > Ted Macy
> > Savage Innovations
> > www.oobug.com <http://www.oobug.com> The next revolution in
robotics...
> >
> >
> > --- In oopic@yahoogroups.com, "Darrell" <videogrfx@> wrote:
> > >
> > > Hi,
> > > It's been a while since I've used an OOPic so forgive me. I'm
using
> > the OOPic to run a DC
> > > motor via the Magnevation dual control board. The code I'm using
> > worked last time I used
> > > this board. (a year ago at least) Now it's not. The motor does
a small
> > step each time I hit the
> > > re-set on the OOPic. After testing and confirming the OOPic is
working
> > and has power etc. I
> > > was wondering if someone could give me a clue what to check
next. The
> > mag board seems
> > > okay and I've never had an issue with one before. I'll
recompile the
> > code again next to see if
> > > that helps. Thanks!
> > > D.
> > >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
------------------------------------
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