FIRST Tech Challenge Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Can LVLM determine what kind of sensor is attached?

Sorry, I know this isn't an FTC specific question, but this seemed like the best LVLM support area on NI.com   

I have a LVLM application that needs to work for Either a Light sensor,OR Color sensor.

That is, the robot hardware may be built using either a Light Sensor or a Color sensor to detect a black line, and I can't control which is used.

Therefore I'd like to either be able to detect it in software or use code that doesn't care which type of sensor is used.

Note: A color sensor can be "told" to act as a basic red LED light sensor.

Why is this important?

Well, the retail LEGO Mindstorms NXT 2.0 kit comes with a Color sensor and no Light Sensor.

However, the LEGO Education NXT Base kit comes with a Light Sensor, and no Color sensor.

So, IF I want to produce a program for a robot built with either kit, my program needs to be adaptable.

Yes, I know I could produce two programs, but what a pain to have to ensure that the end user installs the correct version.

Also, the problem is actually biggere, because there are TWO sensors, so I'd need 4 different programs.

Any suggestions on how I can make my program flexible enough to use either one? 

Phil.

Get a life? This IS my life!
0 Kudos
Message 1 of 1
(3,006 Views)