Thread: Color sensor?
View Single Post
  #2   Spotlight this post!  
Unread 13-01-2013, 18:41
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Color sensor?

It can connect directly to the I2C port on the Digital Sidecar using a Lego cable. The connector is the same.

In software, you will need to write software to read the I2C registers. Using the I2C lego compass as a basis, I wrote a bit of code a few years ago to deal with the color sensor. It's a few years old, but I opened it and it at least opens with the current library. I attached it. Use it if you want, YMMV.
Attached Files
File Type: zip HiTecnicColorSensor.zip (35.4 KB, 29 views)
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack