View Single Post
  #4   Spotlight this post!  
Unread 28-01-2014, 00:10
TomThompson TomThompson is offline
Registered User
FRC #0847
 
Join Date: Jan 2010
Location: Philomath, Oregon
Posts: 23
TomThompson is an unknown quantity at this point
Re: i2c java and arduino

We have been using that thread for some ideas. Thanks for posting the code there. So far we have two arduinos talking to each other using i2c. The slave has three parallax ultrasounds and the master is simply collecting that data and printing the data to the serial monitor. Once we know that is working well, we will replace the arduino master with the cRio. Other than what needs to go in the constructor, it appears we many only need to use the read method in java to read three consecutive bytes that will represent the 3 distances on the three parallax sensors.

The whole system will read 5 sensors and the arduino will choose which three to send on to the cRio. Two of the three will be pointed at the side wall to help keep the robot moving straight during autonomous. Lots of other ways to do this but this seemed most interesting and a new challenge.
Reply With Quote