|
Re: Arduino with LabVIEW
We have the following for the Arduino and are setting it up as a Slave Sender:
#include <Wire.h>
void setup()
{
Wire.begin(2); // join i2c bus with address #2
Wire.onRequest(requestEvent); // register event
}
void loop()
{
delay(100);
}
// function that executes whenever data is requested by master
// this function is registered as an event, see setup()
void requestEvent()
{
Wire.write("hello "); // respond with message of 6 bytes
// as expected by master
}
At this point we are not sure what we need to do in LabView....any assistance will be greatly appreciated.
|