The HiTechnic Sensor Multiplexer (SMUX) is a complex sensor that requires a fair amount of intimate knowledge of its operation in order to use it. The tutorial has both ROBOTC and NXC examples. Please note that error checking for all the I2C calls is outside the scope of this tutorial. This was done so as to not clutter the code and take away from the essence; to show how the SMUX works.
Table of contents:
- The HiTechnic Sensor Multiplexer
- Introduction
- Operational states
- Multiplexer Operation
- How does it do what it does?
- Programming examples
- Putting it all together
- Advanced operations
- Dealing with the unexpected
- 3rd Party ROBOTC Driver Suite
- Appendix A Register Layout + Function
- Appendix B: SMUX Status
- Appendix C: Channel Mode
- Appendix D: Channel Type
- Appendix E: Supported Sensors
I hope you enjoy reading it and learning from it as much I enjoyed writing it.
You can download the tutorial here: [LINK].
Edited: 23-11-2009, updated tutorial to v1.0
Edited: 25-11-2009, updated tutorial to v1.0.1
Hello Xander,
thank you for the tutorial, it’s a helpful reading!
egrath
Thanks Xander!
I’m a programmer for an FTC Team in the US and I can’t tell you how many times your sample programs/tutorials have saved me! We just got one of these multiplexers, and the tutorial has been a great help. Thanks again!
-Eric
I am glad it was useful to you 🙂
Hello Xander,
I dont know its possible but i have to ask , the unic MUX for servos is the mux of mindsensors and i was wondering if i can use the driver of that mux and use it in the Hitechnic SMUX to use it like a servo mux, or if the mux of Hitechnic suport the use of servos using I2C??
Hi Nicolas,
If I understand correctly, you would like to know if it is possible to use the HiTechnic Sensor MUX as an NXT motor MUX? I’m afraid that is not possible. The HiTechnic SMUX only supports sensors, not motors.
ok, thanks a lot and sorry for the bad english jajaj im from chile 😀
Hello, I’m starting to use NXC, and I do not know how to install SMUX driver in Bricxcc and the NXT brick.
Hi there,
Take a look at the programs that I have included with the NXC driver for NXC: HTSMUX-test1.nxc and HTSMUX-test2.nxc. When you compile and download those to the brick, the driver will be included automatically. You can find it here: http://botbench.com/blog/2010/04/09/released-nxc-driver-for-hitechnic-sensor-mux/