
Configuring Sensor Within Program
Is there a way to configure a sensor from within the program, according to user input? I've tried it using
But the sensor is still configured the way I originally initialized it (as a sensorNone), and it gives me an error saying that variable "sensor" was never defined, while, at the start of the program, I configured it using this
If it's impossible to configure within the program, is there any way to detect what sensor is connected to a given port? (I think it'd be possible with I2C, for digital sensors at least, but I'm just wondering if there is an easier way)
Thanks!