Home / Programming / ROBOTC Driver Suite / Released: ROBOTC Driver Suite V1.0

Released: ROBOTC Driver Suite V1.0

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:

#pragma config(Sensor, S1,     HTCS2,               sensorI2CCustomStd)
#include "drivers/common.h"
#include "drivers/HTCS2-driver.h"
task main () {
  int _color = 0;
  eraseDisplay();
  while (true) {
    //eraseDisplay();
    _color = HTCS2readColor(HTCS2);
  }
}

To use the same sensor via the SMUX, you’d use the following:

#pragma config(Sensor, S1,     HTSMUX,               sensorI2CCustomStd)
#include "drivers/common.h"
#include "drivers/HTCS2-driver.h"
task main () {
  int _color = 0;
  HTSMUXinit();
  HTSMUXscanPorts(HTSMUX);
  eraseDisplay();
  while (true) {
    //eraseDisplay();
    _color = HTCS2readColor(msensor_S1_1);
  }
}

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.

You can download V1.0 here: [LINK].
The drivers’ website is here: [LINK].
The documentation can be found here: [LINK].
You can download the software from the Source Forge page here: [LINK].

About Xander

Xander Soldaat is a Software Engineer and former Infrastructure Architect. He loves building and programming robots. He recently had the opportunity to turn his robotics hobby into his profession and has started working for Robomatter, the makers of ROBOTC and Robot Virtual Words.