MR Ultrasonic Range Sensor

Part 1: Plugging in Your Range Sensor

Part 2: Configuring Your Sensor

Choose an open I2C port Choose MR Range Sensor Name it “sensor_range”Part 3: Running Test OpMode

- Create a new file with the below settings:

- Build everything and run your opMode by selecting it on your driver’s station.

- Move your hand back and forth in front of your range sensor, noting what kind of values you get.

- Of the functions you can use, I find rangeSensor.rawUltrasonic() to be the most useful. Moving forward, we will combine this code with some while loops and if statements to accurately navigate the field.

- For seeing objects that are super close to you (inside 5 cm) , it may also be useful to use the rangeSensor.cmOptical() function.

Last updated

Was this helpful?