View unanswered posts | View active topics It is currently Sun Aug 31, 2014 7:15 am






Reply to topic  [ 14 posts ] 
Help with SMUX and IR Seekerv2 
Author Message
Expert

Joined: Mon Oct 27, 2008 9:59 pm
Posts: 137
Post Help with SMUX and IR Seekerv2
Xander,
I have a new sensor multiplexer from Hi-Technic and a couple of IR Seekers (v2) and wanted to try using them together.

I am using your driver suite, specifically HTIRS2-driver.h which seems to work great... until I tried using it through the smux.

The first issue I ran into was that the HTSMUXscanPorts() only seemed to want to work if the smux was connected to s1. It seems from the documentation that I should be able to connect it up to any sensor port and just remember to address the sensors appropriately (ie. msensor_S1_1 vs msensor_S3_2).

The second issue I ran into is that I seem to be getting a single return value back and subsequent calls to get update values return the same initial junk. I thought it may be something with my code, but I found that your example/test program HTIRS2-SMUX-test1.c is giving me the same behavior.
I'm not sure if I have a hardware issue or something goofy somewhere else, but any help would be much appreciated!

I've attached a screenshot of the remote screen I get when running HTIRS2-SMUX-test1.c with the smux connected to s1 and an IR Seeker connected to ports 1 & 2 on it.
I'm using ROBOTC 2.03 (the latest build for FTC which resolved the license issue).

Thanks,
l0jec


Attachments:
Screen.JPG
Screen.JPG [ 26.26 KiB | Viewed 4883 times ]
Tue Jun 08, 2010 1:58 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3205
Location: Rotterdam, The Netherlands
Post Re: Help with SMUX and IR Seekerv2
The test program is only made to poll the IR Seeker on SMUX channel 1. If you want it to read from another port, you will have to modify the test program. The test program is just that, a small program to test the driver and give an example of how to use the API :)

If you have modified the test program, be sure to attach it to this thread.

- 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 Jun 08, 2010 2:13 am
Profile WWW
Expert

Joined: Mon Oct 27, 2008 9:59 pm
Posts: 137
Post Re: Help with SMUX and IR Seekerv2
Thanks for the quick reply.
Modifying the test program didn't seem help with the sensor port issue when I was messing with it, but the real problem is the values not being upated regardless of where I plug the smux in. In that regard, I think I discovered the exact scenario by experimentation.
By removing the second IR Seeker from the smux, the values for the first begin updating. It does not matter what port on the smux I plug it into.. as long as there are two IR Seekers plugged in, neither seem to work.
As a workaround in my own program, I have moved an US sensor to one of the other ports on the smux and the second IR Seeker to sensor port 4 on the NXT & that appears to be working fine.

Any ideas why I cannot use two IR Seekers on the same smux?


Tue Jun 08, 2010 3:00 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3205
Location: Rotterdam, The Netherlands
Post Re: Help with SMUX and IR Seekerv2
I can take a peek at the code. I don't have two of them so it's hard to duplicate. I'll get back to you :)

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 Jun 08, 2010 3:14 am
Profile WWW
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3205
Location: Rotterdam, The Netherlands
Post Re: Help with SMUX and IR Seekerv2
Can you run this program (it's an .rxe). It should work fine with ROBOTC 2.02. Let me know if the battery status changes if the 2nd IR Seeker is connected.

- Xander


Attachments:
HTIRS2-SMUX-tes.zip [2.77 KiB]
Downloaded 401 times

_________________
| 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 Jun 08, 2010 3:28 am
Profile WWW
Expert

Joined: Mon Oct 27, 2008 9:59 pm
Posts: 137
Post Re: Help with SMUX and IR Seekerv2
Sure; I'm at work now, so I won't be able to test it until this evening.
Will post the results.

EDIT:
If it helps, I noticed that having the second IR Seeker plugged in only made a difference when I re-started the program. That is, plugging the second IR Seeker in & out while the code is running makes no difference; you have start the program with it plugged in or not to see the change in behavior.


Tue Jun 08, 2010 8:53 am
Profile
Expert

Joined: Mon Oct 27, 2008 9:59 pm
Posts: 137
Post Re: Help with SMUX and IR Seekerv2
Xander,
I downloaded the program to the NXT, but when I run it I just get an error msg on the NXT screen saying "Bad Version!" and it then exits.
Not sure if that helps.
Thanks,
l0jec


Tue Jun 08, 2010 8:38 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3205
Location: Rotterdam, The Netherlands
Post Re: Help with SMUX and IR Seekerv2
That means you are not running ROBOTC 2.02. What are you running?

- 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 Jun 09, 2010 12:50 am
Profile WWW
Expert

Joined: Mon Oct 27, 2008 9:59 pm
Posts: 137
Post Re: Help with SMUX and IR Seekerv2
Sorry, I'm running 2.03, the latest build for FTC which resolved the license issue (http://www.robotc.net/ftc/).


Wed Jun 09, 2010 10:07 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3205
Location: Rotterdam, The Netherlands
Post Re: Help with SMUX and IR Seekerv2
That would explain why it doesn't work. I compiled it on 2.02. I've attached the program. Make sure you use the latest version of the driver suite. You can download it here: [LINK].

- Xander


Attachments:
HTIRS2-SMUX-test1.c [4.73 KiB]
Downloaded 416 times

_________________
| 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 Jun 09, 2010 11:22 am
Profile WWW
Expert

Joined: Mon Oct 27, 2008 9:59 pm
Posts: 137
Post Re: Help with SMUX and IR Seekerv2
The battery status did not change when I added the second IR Seeker to smux.


Wed Jun 09, 2010 9:30 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3205
Location: Rotterdam, The Netherlands
Post Re: Help with SMUX and IR Seekerv2
I might write you a quick NXC program in the next few days or so to rule out my drivers. There is no way for me recreate this problem here since I don't have two of these. It's a very strange problem, for sure. I can't see a problem in the code either. I've had multiple sensors of the same kind connected to the SMUX before and it's never been a problem.

Does it make a difference which one is connected to the SMUX channel 1 and 2?

- 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]


Thu Jun 10, 2010 1:00 am
Profile WWW
Expert

Joined: Mon Oct 27, 2008 9:59 pm
Posts: 137
Post Re: Help with SMUX and IR Seekerv2
Quote:
Does it make a difference which one is connected to the SMUX channel 1 and 2?

Did not appear to make a difference if I switched them around.

It is certainly an odd one, but I think knowing the scenario and having a workaround is enough for anyone else who runs into the issue for now. If you happen to come up with an idea and need someone with two IR Seekers and a smux to test it out for you, feel free to shoot me a message.

Thanks for the help,
l0jec


Tue Jun 15, 2010 9:07 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3205
Location: Rotterdam, The Netherlands
Post Re: Help with SMUX and IR Seekerv2
l0jec,

Will do. I will try to get a hold of a second seeker and test it here with the debugger and protocol analyser.

- 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 Jun 15, 2010 9:11 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 14 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


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.