I'd Rather Be Building Robots

October 30, 2009

Released: ROBOTC Driver Suite V1.1

Filed under: RobotC Drivers, Sensors — Xander @ 21:32

A new version (1.1) of the ROBOTC driver suite awaits your download from the usual source.
Not as many changes in this release as with the previous one. Changes include:

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

October 6, 2009

Released: ROBOTC Driver Suite V1.0

Filed under: RobotC Drivers, Sensors — Xander @ 22:01

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

August 1, 2009

Released: ROBOTC Driver Suite RC6

Filed under: RobotC Drivers, Sensors — Xander @ 23:34

Another release with some changes and additions:
HTAC-driver.h:

  • Fixed bad registers
  • Added HTACreadAllAxes(tSensors link, int &x, int &y, int &z)
  • Removed HTACreadAllAxes(tSensors link, tIntArray &data)
  • Changed HTACreadX, Y, Z to use by reference instead of as return value

HTIRS-driver.h:

  • Fixed wrong registers

HTEOPD-driver.h:

  • Added HTEOPDsetShortRangeNW and HTEOPDsetLongRangeNW, these don’t wait 10ms
  • Changed the underlying sensor types for ROBOTC 1.57A and higher.

New Drivers:

  • Added support for MSDIST-nx Sharp IR sensor
  • Added support for MSAC Acceleration sensor
  • Added support for MSHID Human Interface Device sensor

This is a quick interim release to address a couple of issues and to syncronise with the version that will be hosted on the HiTechnic website. Stay tuned for many changes in the next month or so. New drivers will include:

  • The new HiTechnic colour sensor
  • Mindsensors RCX sensor MUX
  • Mindsensors PFMate
  • Mindsensors Servo controller
  • and maybe even a few you’ve never even heard of…

I’ve also been working on making most functions pass by reference, rather than making use of structs of arrays. All of these things will be in the next release.

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

June 23, 2009

Released: RobotC Driver Suite RC5

Filed under: RobotC Drivers, Sensors — Xander @ 20:31

Some minor changes in this version and some bug fixes.

Changelog:

HTDIR-test1.c (0.2)

  • Partial rewrite by Dick Swan, waits a little longer for sensor initialisation
  • Nicer intro screen
  • Less screen flickering, only updated if there’s been a change in data.

common.h: (0.3.2)

  • makes use of the new alpha’s built-in clearI2CBus(). It is still defined for the older firmwares

MSLL-driver.h: (0.5)

  • Bug in LLreadSteering() fixed

HTPB-driver.h: (0.7)

  • Fixed a couple of function calls that had not been renamed.

TODO:

  • Add UART (RCX) functionality to HiTechnic IR Link driver.

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

June 18, 2009

Released: RobotC Driver Suite RC4

Filed under: RobotC Drivers, Sensors — Xander @ 16:11

A new version of the RobotC Driver Suite has been released.  A driver for the Mindsensors LineLeader sensor was added.  The initial driver was written by Thom Roach and modified by me to fit better into the suite’s framework.  Thank you Thom for your work!

Changelog:

  • Many drivers had their API renamed subtly to be more consistent.  Check the individual drivers to see if they were affected.
  • Mindsensors LineLeader driver added (Thom Roach)
  • AT24C512 driver is now generic EEPROM driver
  • common.h now has a clip() function (Thom Roach)

TODO:

  • Add UART (RCX) functionality to HiTechnic IR Link driver.

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

May 31, 2009

Released: RobotC Driver Suite RC3

Filed under: RobotC Drivers, Sensors — Xander @ 16:28

A new version of the RobotC Driver Suite has been released.  Two new drivers were added and some improvements were made in the I2C bus error handling.

Changelog:
  • NEW: Added driver for AT24C512 EEPROM chip.
  • NEW: Added Light Sensor driver with calibration!  You can use one of the test programs to calibrate for both white and black.  Calibration data is saved to a file which is read when the driver is first used. You can also use the API to write your own calibration program.
  • I2C bus error handling code added to common.h.  When an error occurs, the bus is now flooded with 5 dummy I2C packets.  This usually clears it up.  The original packet is then retransmitted. Note that this is done only once for each packet.
  • HTPB driver has error checking removed, this is now handled by common.h
  • The drivers will generate an error when compiled with a RobotC less than 1.46.
TODO:
  • Add Mindsensors Line Leader driver, waiting for firmware API to stabilise
  • Add UART (RCX) functionality to HiTechnic IR Link driver.

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

May 15, 2009

New revamped RobotC Drivers project page

Filed under: Ramblings, RobotC Drivers — Xander @ 12:55

After a couple of hours of fiddling with HTML in Notepad, I’m proud to present the new and improved project page for the 3rd Party RobotC Driver project.  I’ll add more to it as time goes by.  For your tree killing pleasure, I’ve also added a PDF version of the documentation so you can print it out more easily.

You can now also donate to this project by clicking on the link at the bottom of that page.  Proceeds will be used to buy an additional NXT set to help with driver development.

Enjoy!

May 8, 2009

Released: RobotC Driver Suite rc2

Filed under: RobotC Drivers, Sensors — Xander @ 18:18

A new release of the drivers has been uploaded.  No code changes but the minimum requirement has gone from RobotC 1.40 to 1.46 after problems were reported with some of the drivers.

RobotC 1.46 can be downloaded from the following location: [LINK].  There is also a 1.47B available, which can be downloaded here: [LINK].

The drivers’ Source Forge project page is here: [LINK]. The documentation can be found here: [LINK].

Xander.

April 26, 2009

Released: RobotC Driver Suite rc1

Filed under: RobotC Drivers, Sensors — Xander @ 20:52

A new release of the 3rd Party Driver Suite for RobotC is out! This version is RC1.

The obligatory Changelog:
- Driver for the new HiTechnic IR Seeker v2 (HTDIR) has been added
- Driver for the HiTechnic Compass Sensor, which I had forgotten to include with beta1 has been added
- New experimental function in the NXTCam driver to calculate the average center of all the blobs of a specific colour index.

You can download the driver and documentation from here: [LINK]
The latest documentation can be perused online here: [LINK]

March 26, 2009

Released: RobotC Driver Suite beta1

Filed under: RobotC Drivers, Sensors — Xander @ 23:26

After many weeks of writing and testing, I’m ready to release my first suite of RobotC drivers for quite a number of devices and sensors.  I’ve tried to make sure that every API call was documented and (almost) all drivers have an example program to demonstrate how to use the driver.  The documentation was created using Doxygen.

The drivers make use of a standard header file that does most of the heavy I2C lifting, this allows me to keep the drivers small and make writing drivers for new devices very easy.  RobotC already has built-in drivers for some of the devices, the idea was to provide more control over when they are polled, at what bus speed and more importantly allow access to the less frequently used functionality of these sensors.

The suite includes drivers for the following devices:
- HiTechnic EOPD sensor (allows sensitivity of sensor to be set)
- HiTechnic Accelerometer sensor
- HiTechnic Gyroscopic sensor (including calibration functions)
- HiTechnic Compass (including recalibration functions)
- HiTechnic Color sensor (including recalibration functions)
- HiTechnic IR Seeker (allows access to individual IR sensors)
- HiTechnic IR Link (allows control over PF motors, both ComboDirect and ComboPWM mode)
- HiTechnic Touch MUX sensor
- HiTechnic ProtoBoard
- Mindsensors NXT Vision Subsystem (can detect colliding blobs and merge them)
- MAXIM MAX127 8 channel 12 bit AD converter
- MAXIM MCP23008 8 channel IO expander

A big thanks to HiTechnic for providing me with the sensors to write the drivers for.

You can download the source code here: [LINK].  The documentation can be viewed here: [LINK].  Please note that all the documentation is included with the driver’s zip file, so you can view it offline, too.

I hope you enjoy using them as much as I enjoyed writing them!

Blog at WordPress.com.