After a long time between releases, I am proud to present to you the latest version of the ROBOTC Driver Suite. The biggest new addition to this version is support for the new HiTechnic SMUX sensor. Adding support for this new sensor involved modifying almost every single driver for the HiTechnic sensors to add the ability to poll the sensors through the SMUX. I've tried very hard to make it as easy to use and transparent as possible.

For example, to use the HiTechnic Colour Sensor V2, you'd use the following code:

As you can see, there's not a whole lot of difference. msensor_S1_1 means the SMUX is attached to sensor port S1 and the Colour Sensor is attached to port 1 of the SMUX. To connect to port 4 of the same SMUX, you'd use msensor_S1_4. All the sensor calls that are supported through the SMUX can be found in the drivers. I recommend you check out the documentation for more information.

A quick overview of some of the changes in this version:

Added support for the new HiTechnic SMUX and created functions for all supported sensors to allow access via the SMUX.

Added support for the new HiTechnic Colour Sensor

Added support for the new HiTechnic Sensor MUX

Added support for the Mindsensors RCX MUX

Added support for the Mindsensors PF Mate

Added support for the latest alpha release of ROBOTC and its ability to distinguish between signed and unsigned.

Ford,Unfortunately, you can't daisy chain them, that's not how this sensor works. As for the simplicity, well, as I was making them I tried to hide as much of the complexity from the user as possible.

Marshalk,It works by recognising the sensor attached to the MUX port (that's what happens when you call HTSMUXscanPorts(HTSMUX);) and then loading a "profile" of that particular sensor. In other words, it needs to know a little about the sensor before it can start polling it. The bytes that are polled are stored in a specific range of registers that can then be retrieved via the brick. If you go through the code, you'll see what I mean.

I am sure you understand why HiTechnic wouldn't put support for their main competitor in their sensors

If you have the SMUX and you want to try something cool, check out SMUX-test1.c, it basically allows you to attach pretty much any supported sensor and it will display the data from those sensors. It's a cool menu driven program. You can detach, attach and rescan as well. Please note that you will need 1.9x to make it work because of the sheer number of functions in it. 1.4x has a 100 function limit, 1.9x has a much higher limit. I'll post a video of that program sometime this week if I get the time.

Future developments:* Support for the IR Receiver (it's somewhere over the Atlantic as we speak)* Support for the NXT Servo sensor (it's getting there)* Optimisation of the drivers, in other words, combine the HTCS and HTCS2 and use sensor identification to make the right I2C calls. The same goes for the IR Seeker and V2.

faulty construction.why can't they simply support the Lego standard..?!!Any sensor type that can be defined e.g. by SensorType[NxtPort] = SensorXYZ orSensorMode[] =...SensorValue[] =... SensorRaw[] =...must be able to be defined at a mux port like SensorTypeMux[NxtPort; MuxPort]=SensorXYZSensorModeMux[] =...SensorValueMux[] =... SensorRawMux[] =...

(or a similar function) by the programmer.BTW I have no idea why Robotc uses [] instead of ()

Also, I am keen to know what you mean by "Lego Standard". Do you mean the I2C standard? It's not a Lego standard at all, it precedes the NXT by quite a number of years. Lego doesn't support half the things you plan to do with your NXT. The MUX supports Lego certified sensors, not the ones that aren't certified. Unfortunately, none of the sensors made by Mindsensors are Lego certified. The MightyBoard which I made for you sure as heck isn't certified by Lego. You can't complain about other people not adhering to imagined standards when you're more than happy to disregard established ones yourself when it suits your purposes.

Now, I will remove all posts from now on that are not related to these drivers. If you want to start a "the new smux sux" thread, go right ahead, but keep it out of this one. Make sure you post it in the "Off-Topic" forum.

Who is online

Users browsing this forum: No registered users and 2 guests

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