skoehler wrote:We seem to have a driver for the Line Sensor for NXT. But not for the Light Sensor Array. You may have to implement the driver yourself. If you have something that work, you should think about contributing the code. We would be happy to accept it.
Maybe the code for the Line Sensor can be adapted to work with the Light Sensor Array? The hardware looks very similar - but the I2C interface might be very different.
Internally their processors and firmwares are different, the NXT-G blocks and NXC/RobotC API's are also different. (Note, they don't work with each other).
The old sensor internally performed the line following computations, and provided simpler output to follow a line.
The new sensor only provides 8 numeric readings for 8 sensors. It does not perform any computations internally. It is somewhat faster than the old one in reporting readings. You have to write your own line following algorithm.
skoehler wrote:On the contrary! The I2C communication with the two sensors is very similar. The command register is at 0x41, the commands are W B D and P etc. for both sensor. Some data is at a different offset (for example the calibrated data resides at 0x42 instead of 0x49). But you (or your teacher) should be able to change that pretty easily.
Of course, you have to implement the PID algorithm yourself. A driver for the light sensor array wouldn't do that anyways.
I don't have the time to write a driver for you right now. And as it seems, you need it soon rather than later. So I can't help.
Users browsing this forum: No registered users and 3 guests