I had some questions regarding the ultrasonic sensor as I tried to use 4 US sensors mounted on a omni drive.
The 4 US sensors are facing 4 different angles ( +- 45 degrees and +- 135 degrees) to detect obstacles and I used the Hitechnic SensorMux to connect the 4 US sensor to NXT.
My first question is, how should I set the US sensor mode to "capture mode"? I checked either the SensorMux.class or the UltrasonicSensor.class and this mode is not implemented...
I googled it and some say that to use the Event Capture Mode:
To use the Ultrasonic Sensor's "Mode 3" with NXC, you need to use I2CWrite(PORTnumber, 0×41, 0×03) to turn on and initialise the sensor. You can the then use SensorUS(PORTnumber) to read the distance to object. To turn the Sensor Off again, you need to use I2CWrite(PORTnumber, 0×41, 0×00). You need to repeat these commands for each Ultrasonic Sensor you are using. It pays to initialise all your Ultrasonic Sensors to the Off state when the program starts.
My second question is if I use SensorMux class how could I set the sensor mode?
Thanks a lot!