|
receiving data from Arduino over i2c?
this is an experiment, not needed to get bot ready for competition, but mentor curiousity:
I think I have writing to the Arduino down: if I do an i2c.write, the Arduino gets a receiveEvent, and the first byte that the Arduino receives is the register number I specified on the I2C.write() call.
Getting data back is hurting my brain. If I issue an i2c.read, I would expect for the Arduino to get a requestEvent. It gets a receiveEvent, and the data on that event is the register number. The problem is that even if I write data on the Arduino from the receiveEvent handler, it doesn't seem to get back to the cRIO; cRIO just seems to hang.
Does anyone have a good example of a cRIO receiving data from an Arduino over I2C that they can share?
|