Announcement

Collapse
No announcement yet.

Multiple MR Core Range Sensors on Single REV Hub

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Multiple MR Core Range Sensors on Single REV Hub

    Hello,

    We are trying to get four MR Core Range Sensors working at the same time. We have no issues getting a single sensor working with the default I2C address. We used the MR Tool to reset the I2C addresses for our sensors as follows:
    0x32 Rev I2C Port 0 name s32
    0x34 Rev I2C Port 1 name s34
    0x36 Rev I2C Port 2 name s36
    0x38 Rev I2C Port 3 name s38

    We configured each of the ports as MR Range Sensor. With the code written for all 4 sensors and all 4 sensors configured we get "Warning problem with "s32", "s34", "s36", "s38".
    We removed all but one sensor at a time and removed the associated configurations so that a single readdressed range sensor is connected and we still get "Warning problem with "XXX" where XXX is the sensor that is still connected. We did verify that the wiring was correct and did provide correct connection when using default I2C address for each sensor.

    We are using ONBOTJAVA and would prefer a solution using this as our main tool as the computers we use (and have available) really bog down when loading Android Studio as they have barely the minimum specs to run Android Studio.

    A couple of years ago when we were using the MR CDIM we used 2 MR gyros which we changed I2C addresses on and were able to tell the code which gyro had each specific I2C address. We can find no way in the SDK to do this now without resorting to use of other libraries.

    Is there a solution within the SDK to allow use of multiple sensors of the same type on a singe REV Expansion hub?
    If we were to reprogram the I2C addresses to default, could we accomplish the same goal (with a lot more wiring and excessive connections) using 2 REV hubs and 2 CDIMs with one Range Sensore on each Hub/CDIM.

    I believe the issue is when we select MR Range Sensor in configuration it is expecting to find the device at the default I2C address.
    We also played around with the configuration and noticed that I2C Device (Synchronous) is deprecated. We were thinking on using the RedStormI2CDevice and RedStormI2CRangeSensor files we found in the found at ChiefDelphi https://www.chiefdelphi.com/forums/s...d.php?t=152357. Is there a way to use these using only OnBotJava by creating a non-opmode file and copying the code to be used, similar to what is done with HardwarePushbot.java?

    FTC Team 8881
    CAD CORPs
    Cardboard And Duct-tape
    Code Of Real Pirates

  • #2
    You should be able to leave all of them on their default address. Unlike the CDIM where the I2C is a single bus, on the REV each of the ports is a separate I2C bus. By default port 0 has the IMU, there is an add option in the config to allow you to add another I2C device. In this case with 2 I2C devices on that bus the addresses do have to be different, but IIRC the defaults for those two are different.

    Comment


    • #3
      We reset all of the MR Range Sensors to the default address of 0x28 and we no longer have the warning.

      Figured out our issue. The "coder" forgot to change the sensors in the telemetry so we were only displaying the info from a single sensor. Now that we fixed the code, it is working.

      Thanks for letting us know that we can use the same I2C address for multiple devices.

      Comment

      Working...
      X