locked
NXT Light Sensor RRS feed

  • Question

  • Hello,

    when i start my light measurement, the values are always betwaeen 9-30.

    I have set the measurement range to 100 and  threshold from 0-100. I've done this in the LegoNxtServiceFiles and the proper manifests.

    Does someone have an idea whats wrong here or how i can fix this ?

    I can't set the lightsensor to LightOff also, perhaps this is the same error. Perhaps I'm only looking in the wrong files/manifests ?

    Thx and greets


    Thursday, May 31, 2007 12:57 AM

Answers

  •  

    This was an example only.  If you want to get all values, leave the checkbox off, or set it to a wide range like this:

     

    Type
    Low Threshold
    High Threshold
    External Range

     

    The main point is that MSRS is returning the sensor value read from a LEGO program on the Brick itself, rather than polling through the PC API. 

    You might try writing a simple LEGO diagram with LEGO's software to read the light sensors and see if it returns the values you are expecting.

    Thursday, June 7, 2007 3:22 PM

All replies

  • A couple people are experiencing the same problem, check out the post titled "AnalogSensor State Not Accurate for Nxt Light Sensor."  I can't get mine to work either, and it sounds like we're having the same issue.  I hope somebody can help, I've tried just about everything to get the sensor to work correctly.
    Thursday, May 31, 2007 2:57 PM
  • The NXT-G calibrate does not help this?  Probably the first thing you tried, but just checking.
    Friday, June 1, 2007 9:56 PM
  •  

    The External Range checkbox simply activates filtering so that values are only returned when they are between Low and High Threshold.

    The actual values are still those reported by the NXT and are not modified by MSRS.

     

    Type
    Low Threshold
    High Threshold
    External Range

    Sunday, June 3, 2007 4:48 PM
  • Hmm.  I've tried making my settings the same as those above, and it still only reports readings from 10-30.  I've also tried making both thresholds the same, so that every value is reported, but the same thing happens.  I've also tried setting all of the other sensors to null to free up NXT resources.  I know my light sensor works because it gives accurate measurements when running the light sensor program directly from the NXT, but I don't know what else I could be doing wrong?
    Tuesday, June 5, 2007 3:12 PM
  •  

    This was an example only.  If you want to get all values, leave the checkbox off, or set it to a wide range like this:

     

    Type
    Low Threshold
    High Threshold
    External Range

     

    The main point is that MSRS is returning the sensor value read from a LEGO program on the Brick itself, rather than polling through the PC API. 

    You might try writing a simple LEGO diagram with LEGO's software to read the light sensors and see if it returns the values you are expecting.

    Thursday, June 7, 2007 3:22 PM
  • Hello again,

    i encounter some problems with the lightsensor again, perhaps someone have an idea on this:

    After getting the lightsensor working in the standard configuration i wanted to start the sensor with the LED 'off'.
    In this state there aren't any notifications. I've checked it directly in the legonxt.cs -> SensorNotificationHandler.
    With the LED on, everything is fine, without the LED there is nothing Sad

    a little OT:
    what is the best way to set the COM-Port of the NXT without the manifest ? We want to run some NXTs in parallel, so every NXT needs his own COM-Port.
    Can i start the service with a standard manifest and then set the COM-port via the NXT Configure Operation ?

    Thanks and greets

    Robotrock


    Saturday, September 22, 2007 9:41 PM
  • Hi.  You should check out the new LEGO NXT services for MSRS 1.5.  The light sensor has more control of the spotlight, and the notifications are easy to use in the MSRS Visual Programming Language.  Also, assuming that your bluetooth adapter will support pairing with multiple bricks, you can use our Manifest editor to run multiple LEGO NXT bricks from one machine.

     

    All New LEGO NXT services available for Microsoft Robotics Studio 1.5!

     

    Check out the download here:

    Samples Update for Microsoft Robotics Studio (1.5)

     

    and documentation on MSDN:

    http://msdn2.microsoft.com/en-us/library/bb870583.aspx

     

    Dave
    Saturday, October 6, 2007 6:22 AM