Friday, February 29, 2008

clock sensor

Having bought the Acceleration sensor, mindsensors.com send me the clock sensor. So they have sent me the acceleration sensor and let me keep the clock sensor.

This clock sensor comes with a block for the Lego FIRMWARE, which worked fine, displaying time and date.
Then i wanted to implement the sensor in C# for the measuring of the time the various sensors use. Although i can use sustem time for this I wanted to make use of another sensor and learn something about it.
The sensorclass wasn't to easy to build! So back to Lejos Java. In this language the same problem. This was not as easyas the acceleration sensor.
So back to Dev Cpp, with the library of Anders, which is very clear to understand. I had to study the direct commands more closely, and constructed my own direct commands sequences, learning a lot about this.

Eevntually the Dev-Cpp classes for the clock started working.
The Datasheet provided by mindsensors.com has all the necessary informations, but....you have to read carefully!

Having made these classes, i'll construct the Lejos Java, and the C# classes. But that is for later.

First these classes, which can be downloaded. First Version: be careful!
NXT clock classes
To be used with the lib of Anders

more versions will follow, for the Lejos, and the C3 lib of Bram Fokke.




0 comments: