View Single Post
  #13   Spotlight this post!  
Unread 27-05-2012, 14:23
WizenedEE's Avatar
WizenedEE WizenedEE is offline
Registered User
AKA: Adam
FRC #3238 (Cyborg Ferrets)
Team Role: Leadership
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Anacortes, WA
Posts: 395
WizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to all
Re: Arduino PWM output

Quote:
Originally Posted by JoshSmith View Post
Quick note one this, it will take some modifications to get it to work (a "stock" Arduino Wire library will not work). And you can use an ethernet shield for your Arduino Uno if you want to get communications over ethernet working (this will still work with a RobotOpen shield if you ever want to add that).

Here is the relevant shield on sparkfun: http://www.sparkfun.com/products/9026
AFAIK we used the "stock" Arduino Wire library on this year's competition robot to communicate the shooter angular velocity with the cRIO.

We just had to use the transaction method of the I2C class.

relevant part of our code:
Code:
UINT8 valuesGotten[2] = {0, 0};
I2CArduino->Transaction(NULL, 0, valuesGotten, 2);
UINT16 fullNumber = (valuesGotten[1] << 8) | valuesGotten[0];
Full code for reading our sensor is attached. I don't currently have access to the arduino side, though.
Attached Files
File Type: zip ArduinoCommunication.zip (1.2 KB, 22 views)