|
Re: LabVIEW roboRIO I2C Master, RIOduino I2C Slave - Help
David,
I've seen the example, it's the best I could find that demonstrates how to setup communication between the Master/Slave. It has been very helpful in defining an initial approach.
In the example, the address set by Wire.begin is 84 on the Arduino (I2C slave). The address set by I2C Open on the LabVIEW end is also 84. This leads me to believe that my approach of setting an address of "4" on both the master and slave in my setup is also correct (just to be safe, I'll change to address 84).
I am using Serial.begin and Serial.print to validate that the RIOduino has received a message from the I2C master (using Tools >> Serial Monitor). I have removed the I2C response of "hello", as I should first confirm that I can receive a message. Since the I2C write loop times out, my suspicion is that there might be an issue in the physical connection between master and slave.
Can you think of any other troubleshooting steps besides:
1) Attempt a direct connection of RIOduino to RoboRIO (remove extension cable)
2) Attempt an I2C connection via the on-board I2C port, instead of the MXP breakout.
I can try executing I2C Open in Begin.VI, though I believe programmatically there is no difference between breaking up the command between Begin and Teleop, or having the I2C Open initialize and loop in Periodic Tasks.
It would be nice to have confirmation that the I2C write approach is valid as well. I am simply writing an unsigned 8-bit integer to the first I2C Register and trying to print that data to the RIOduino COM Serial Monitor.
Appreciate the help again. I'll definitely consider putting together a guide for new users interested in controlling individually addressable LED strips from LabVIEW via a micro-controller and the I2C protocol.
Best,
Peter
|