Go to Post FIRST is a learning, growing and inspiring organization. We can never dictate pretty. We can however encourage and teach quality. - Steve W [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #14   Spotlight this post!  
Unread 28-05-2012, 00:47
JoshSmith JoshSmith is offline
LED Junkie
FRC #0111 (WildStang)
Team Role: Mentor
 
Join Date: May 2011
Rookie Year: 2009
Location: Arlington Heights
Posts: 16
JoshSmith is an unknown quantity at this point
Re: Arduino PWM output

Quote:
Originally Posted by WizenedEE View Post
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.
Interesting. I know for this year I changed the Wire library to run at 38.4khz (what I was told was the digital sidecar's operating frequency for I2C) and just set the Arduino up as a slave device and it worked nicely. But anyways, I will stop myself now before I get too far off-topic. My recommendation on the shields is that if you plan on making more robots than cRIOs, then you should look at a shield as they will be cheaper than spending credits or money on an extra cRIO. Otherwise, if you have a cRIO lying around, just use that (providing you have a backup for your competition bot).

Last edited by JoshSmith : 28-05-2012 at 00:50.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 06:28.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi