Closed luciengaitskell closed 8 years ago
I have a MaxSonar Ultrasound sensor with requires a word read. Also, I have a led which changes color using three bytes. Is there any way to work with these with the current library?
Sure. The easiest way is to read the bytes as a byte array, then use a ByteBuffer (I think it’s called; I’m away from my main machine at the moment) to convert that to an integer, either little endian, or big endian, as appropriate.
Another question, what do I put in for the "OpMode context" in the "ClassFactory.createI2cDeviceClient()"?
Just pass the instance of the (subclass of) OpMode that you are running.
Ok. Why is it needed?
I'm trying to use multiple sensors on the same port using your I2cDeviceClient library, yet I seems to hang the OpMode when I try to interface to both at the same time. Is it possible to interface multiple sensors on one port using your library?
Using multiple sensors on one port is not something that is supported. Is that important to you? Can you help us understand by illustrating with an example?
Is there any capability for word read and writes in the I2cDeviceClient class. If not, is there any planned?