To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 27427
27426  |  27428
Subject: 
Re: NXC: turning on the light
Newsgroups: 
lugnet.robotics
Date: 
Tue, 15 Apr 2008 11:07:14 GMT
Viewed: 
6289 times
  
My guess is you can turn it on using one of the powered sensor types such as
SENSOR_TYPE_LIGHT_ACTIVE or SENSOR_TYPE_LOWSPEED_9V.  I don't have a lamp to
test this with or any of the cables that are required to connect a lamp to a
sensor port.  The retail set doesn't include any of these cables or the lamp
itself.

Let me know if this works or not.

John Hansen

Since the lamp is a rather power hungry device, it is best to drive it with an
output port.
Use OnFwd(port, pwr) to turn it on (with brightness controlled by pwr
parameter), Off(port) to turn it off.

Though I have not tested, it should also glow dimly when plugged in a sensor
port. As John explained, set sensor type to SENSOR_TYPE_LIGHT_ACTIVE or
SENSOR_TYPE_LOWSPEED_9V to light it, SENSOR_TYPE_TOUCH will turn it off.

Philo



Message is in Reply To:
  Re: NXC: turning on the light
 
(...) My guess is you can turn it on using one of the powered sensor types such as SENSOR_TYPE_LIGHT_ACTIVE or SENSOR_TYPE_LOWSPEED_9V. I don't have a lamp to test this with or any of the cables that are required to connect a lamp to a sensor port. (...) (16 years ago, 14-Apr-08, to lugnet.robotics)

9 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