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

Xander,Can your light sensor calibration driver calibrate 2 sensors? And does anything need to be done with the program reading from the sensors? I would have posted this under RC6, but RC3 was when the LS driver was released

No, it only stores calibration data for one sensor. This data is then used for all light sensors that are currently connected. The problem with using multiple sensors and separate calibration data is that you have to make really sure that the sensors are always connected to same sensor ports because the brick has no way of differentiating between them. This is also how NXT-G works.

Xander,For me I try and keep the sensors in the same port, and they pick up different values. I am using your calibration driver to keep the values the same, and it is an advantage that I don't have to change my threshold, just recalibrate with your driver. With the two sensors in the same ports constantly, would I be able to use 2 sensors?

It wouldn't work, but I could calibrate one sensor to read the same value as the other, instead of a dfference It would complete my primary objective, but I would have to recalculate the thresholds each time! My friend has also used every light sensor in the school trying to find a match, so I'll tell him! Unless... Does the calibration for oone sensor go for both?

No, you don't use SensorValue, you need to have a look at the example program for this driver. It will make things a lot clearer I wrote extensive documentation for this driver, please take the time to have a look at it.

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