To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.nqcOpen lugnet.robotics.rcx.nqc in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / NQC / 1172
1171  |  1173
Subject: 
Re: Strange happenings
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Thu, 12 Jul 2001 14:43:47 GMT
Viewed: 
5035 times
  
In lugnet.robotics.rcx.nqc, Dean Husby writes:
> I'm using NQC 2.3r1 with the following code bit.
> 
> task Fidget() //The Fidget task
> {
> while (true)
> {
> Wait (FidgetTime);
> Fwd (OUT_B);
> OnFor (OUT_B,100);
> HeadPos = 1;
> Wait (FidgetTime);
> 
> Rev (OUT_B);
> OnFor (OUT_B,100);
> HeadPos = 0;
> Wait (FidgetTime);
> 
> Rev (OUT_B);
> OnFor (OUT_B,100);
> HeadPos = 2;
> Wait (FidgetTime);
> 
> Fwd (OUT_B);
> OnFor (OUT_B,100);
> HeadPos = 0;
> 
> }
> } //End Fidget Task
> 
> 
> Here's what it's supposed to do.
> 
> Wait the wait time then turn it's head left. Wait some more then turn
> it's head back to centre. Then Right, then Center again.
> 
> Here's what it does.
> 
> Turn's left.
> Makes a feable buzzing sound for the TURN right. Then moves right then
> buzzes again.
> 
> Any ideas? This is so simple I can't have done it wrong?
> 
> Dean

This almost sounds like a mechanical problem. Try the program with jsu the
brick connected to motors or lights and see if you get the expected result.

Lester



Message is in Reply To:
  Strange happenings
 
I'm using NQC 2.3r1 with the following code bit. task Fidget() //The Fidget task { while (true) { Wait (FidgetTime); Fwd (OUT_B); OnFor (OUT_B,100); HeadPos = 1; Wait (FidgetTime); Rev (OUT_B); OnFor (OUT_B,100); HeadPos = 0; Wait (FidgetTime); Rev (...) (25 years ago, 12-Jul-01, to lugnet.robotics.rcx.nqc)

5 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR