View unanswered posts | View active topics It is currently Sat Jul 26, 2014 9:10 am






Reply to topic  [ 6 posts ] 
Setting modes on multiplexed sensors 
Author Message
Rookie

Joined: Thu Nov 07, 2013 12:14 pm
Posts: 5
Post 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.


Tue Dec 31, 2013 12:15 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3163
Location: Rotterdam, The Netherlands
Post 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

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Tue Dec 31, 2013 2:51 am
Profile WWW
Rookie

Joined: Thu Nov 07, 2013 12:14 pm
Posts: 5
Post 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.


Tue Dec 31, 2013 11:47 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3163
Location: Rotterdam, The Netherlands
Post 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

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Tue Dec 31, 2013 3:42 pm
Profile WWW
Guru
User avatar

Joined: Sat Mar 01, 2008 12:52 pm
Posts: 1030
Post 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! )

_________________
regards,
HaWe aka Ford
#define S sqrt(t+2*i*i)<2
#define F(a,b) for(a=0;a<b;++a)
float x,y,r,i,s,j,t,n;task main(){F(y,64){F(x,99){r=i=t=0;s=x/33-2;j=y/32-1;F(n,50&S){t=r*r-i*i;i=2*r*i+j;r=t+s;}if(S){PutPixel(x,y);}}}while(1)}


Wed Jan 01, 2014 7:03 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3163
Location: Rotterdam, The Netherlands
Post 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

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Wed Jan 01, 2014 10:49 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.