View Single Post
  #6   Spotlight this post!  
Unread 17-11-2016, 12:47
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 666
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: How to get data from an Arduino and send it to a Roborio

I2C devices have the concept of master/slave. Only the master can initiate a bus transaction. In your case, the RoboRIO is the master and the Arduino is the slave. So the RoboRIO needs to issue a command to get data from the Arduino. What exactly are you trying to read from the Ardino? You need to design a ReadData command so that the RoboRIO issues this command and the Arduino will respond by returning the data. Since the Arduino cannot initiate the bus transaction, if the data is "on-demand", you may need to have the RoboRIO "poll" for data periodically.
__________________
Reply With Quote