To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.spyboticsOpen lugnet.robotics.spybotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Spybotics / 74
73  |  75
Subject: 
Re: Spybotics To RCX Comm
Newsgroups: 
lugnet.robotics.spybotics
Date: 
Thu, 29 Aug 2002 20:03:36 GMT
Viewed: 
4892 times
  
In lugnet.robotics.spybotics, Steve Hassenplug writes:
Yes, I use NQC and BricxCC to program it.  It's very simple, and I just set motor port C to forward

That is not the way to simply turn on the laser LED.  When you set motor C
to forward the LED will commence sending VLL motor forward commands out the
LED which, of course, will result in a flickering LED.

The Scout worked the same way - the LED would flicker because it was sending
a pattern of flashing lights that a VLL receiver would interpret as a motor
command.

With NQC just use:

  SetLight(LIGHT_ON);

or

  LED(LED_MODE_ON);

Here's a modified version of 5_light.nqc.  Using two light pipes that are
held close together at the far end (and pointed directly at the ground about
a 1/4 inch above the ground) I am able to detect the presence of a dark
stripe on a light surface.  I used a technic cam to hold the ends of the
light pipes with a simple frame extending from the rear of the spybot to
hold everything in the correct position.  Can someone work up a "good"
structure for this?  Mine is definitely just a quick and dirty hack.

// 5_spy_light.nqc
#define THRESHOLD 40

task main()
{
  SetLight(LIGHT_ON);
  SetSensorMode(SENSOR_2, SENSOR_MODE_PERCENT);
  OnFwd(OUT_A+OUT_B);
  while (true)
  {
    if (SENSOR_2 > THRESHOLD)
    {
      OnRev(OUT_B);
      Wait(10);
      until (SENSOR_2 <= THRESHOLD);
      OnFwd(OUT_A+OUT_B);
    }
  }
}

John Hansen



Message is in Reply To:
  Re: Spybotics To RCX Comm
 
Yes, I use NQC and BricxCC to program it. It's very simple, and I just set motor port C to forward Steve ----- Original Message ----- From: "Dean Husby" <nntp@akasa.bc.ca> Date: Thu, 29 Aug 2002 17:27:17 GMT To: lugnet.robotics.spyb...lugnet.com (...) (22 years ago, 29-Aug-02, to lugnet.robotics.spybotics)

3 Messages in This Thread:


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

Custom Search

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