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).

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.

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.

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

l0jec

Expert

Joined: Mon Oct 27, 2008 9:59 pmPosts: 139

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

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?

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.

Who is online

Users browsing this forum: No registered users and 1 guest

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