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!