Available for Windows/sdist on pypi (2020.0.1), and installable on the roborio using robotpy-installer.
REV supports simulation for these, so they’re useful even outside of a roborio!
Available for Windows/sdist on pypi (2020.0.1), and installable on the roborio using robotpy-installer.
REV supports simulation for these, so they’re useful even outside of a roborio!
Thank you for this. Does anyone know if it is possible to run both the color sensor and a Rev distance sensor on the same robot without using a co-processor? I know i2c is a buss system, but they both seem to use the same sensor. I do not mind using i2c directly. I got the distance sensor working on an Arduino easily (I can probably replicate some of the direct address work in python if I cannot figure out the wrapper magic you all do). However, if address issues are a non-starter, we can stick to the co-processor for the distance sensor and save a bit of time during the build season.
~Mr. R^2
As you observed, the REV Color Sensor v3 and the REV 2m Distance Sensor use the same I2C bus address. This I2C multiplexer: https://www.adafruit.com/product/2717 allows you to attach up to 8 I2C buses to a single bus. You can then put the devices with the same address on different output buses of the multiplexer. A single-byte write to the multiplexer’s I2C bus address controls which of the downstream buses are connected to the bus coming from the Rio at any given time. That is, you tell the multiplexer which downstream bus you want to be connected then you can talk to devices on that bus for awhile, then you tell it a different downstream bus. It’s a lot simpler than trying to do it with a coprocessor.
Also note that as of this writing the REV 2m distance sensor library has not been ported for 2020, although there are signs that work is occurring on the project’s github repository.
robotpy-rev-color 2020.1.2.0 is now available, updating to the latest REV color API package.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.