View Single Post
  #2   Spotlight this post!  
Unread 23-01-2014, 20:24
bjackson2016's Avatar
bjackson2016 bjackson2016 is offline
Website
FRC #1111 (Power Hawks Robotics)
Team Role: Webmaster
 
Join Date: Jan 2014
Rookie Year: 2011
Location: Crofton MD
Posts: 6
bjackson2016 is an unknown quantity at this point
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.
Reply With Quote