FindBall NXT and RobotC Feb 03, 2014

Xander Soldaat, of Bot Bench (and RobotC driver) fame, has written an excellent article about the FindBall and EmitIR devices. The article also includes lots of photos of his teardown of the sensor, showing both the structure of the case and the electronics. Following his suggestion of changing the pin alignment, we have modified the case to make the pins an odd number of spaces apart, so the sensor is easier to center. All FindBalls now being sold have this case.

He's also written a RobotC driver for the FindBall for us, which makes interacting with the sensor really easy, and has included it in the RobotC third-party driver suite. The sample programs included in the driver suite show how to read all of the important registers. To read the best sensor and its strength using his driver, it's just 8 lines of code:

#pragma config(Sensor, S1,     TR10FB,         sensorI2CCustom)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

#include "drivers/tris10-findball.h"

task main () {
  while (true) {
    nxtDisplayTextLine(5, "Dir: %3d", T10FBreadDir(TR10FB));
    nxtDisplayTextLine(6, "Strength: %3d", T10FBreadStrength(TR10FB));

Thanks Xander!