ROBOTC.net forums
http://robotc.net/forums/

Setting modes on multiplexed sensors
http://robotc.net/forums/viewtopic.php?f=41&t=7543
Page 1 of 1

Author:  gadolchik [ Tue Dec 31, 2013 12:15 am ]
Post subject:  Setting modes on multiplexed sensors

Can you please explain if there's a way to send commands / set modes on sensors that are connected via the HiTechnic Sensor MUX?

For example, setting the 1200bps mode on the IR Seeker 2, or setting single-shot mode on the lego ultrasound sensors?

The current code (USsetOff(), HTIRS2setDSPMode(), etc) appears to only accept a tSensors as a first argument to these functions.

We're using RobotC 3.62.

Author:  mightor [ Tue Dec 31, 2013 2:51 am ]
Post subject:  Re: Setting modes on multiplexed sensors

The thing is, you can't. There is no way to "write" to a sensor when it is connected to the SMUX. That means you cannot set the mode because that requires a command to be sent to the sensor from the NXT.

The version of ROBOTC is not a factor in this case, it's a design choice/limitation of the SMUX.

= Xander

Author:  gadolchik [ Tue Dec 31, 2013 11:47 am ]
Post subject:  Re: Setting modes on multiplexed sensors

Thanks for the quick reply..

So we're going to have a tough time with several ultrasound sensors connected through a mux interfering with each other.

Author:  mightor [ Tue Dec 31, 2013 3:42 pm ]
Post subject:  Re: Setting modes on multiplexed sensors

Yeah, I'm afraid that is to be expected with this type of sensor. The echos can really mess up the other ones. There's no really good way to fix this.

= Xander

Author:  Ford Prefect [ Wed Jan 01, 2014 7:03 am ]
Post subject:  Re: Setting modes on multiplexed sensors

what about the Mindsensors NXT sensor mux and then running the USS in single-shot mode...? 8-)

(to me this big lack of full value sensor ports always was an issue since more than 6 years, so I'm hopefully awaiting daisy-chaining of lots of EV3s by RobotC 4! )

Author:  mightor [ Wed Jan 01, 2014 10:49 am ]
Post subject:  Re: Setting modes on multiplexed sensors

With the Mindsensors SMUX you could switch channels but it's not a very efficient or fast process. That SMUX is not made to be used to switch quickly between channels, but more for a sequential access requirement to a few sensors that wouldn't be used together during a match.

= Xander

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/