Go to Post Or you could go to the Waterloo or Greater Toronto regional, walk up to anyone in their pit, and ask. You may end up feeling like you asked for a sip of water and ended up soaked by a fire hose, but you won't walk away disappointed. - Richard Wallace [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 13-03-2014, 11:38
Chiller Chiller is offline
Registered User
AKA: Connor Christie
FRC #4095 (RoXI Robotics)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 118
Chiller is on a distinguished road
Connect Arduino to cRIO

How would I go about wiring my Arduino uno to the Digital Sidecar for use as a slave through I2C?

I tried just wiring up pins A4 & A5 to the SDA ans SDL lines but that did not work...

I was reading somewhere that those two lines need pullup resistors, is this true and will this make a difference?

Thanks, Chiller!
  #2   Spotlight this post!  
Unread 13-03-2014, 11:49
Danny Diaz's Avatar
Danny Diaz Danny Diaz is offline
Smooth Operator
AKA: FrankenMentor
None #0418
Team Role: Alumni
 
Join Date: Apr 2005
Rookie Year: 2003
Location: Manchester, NH
Posts: 545
Danny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond repute
Send a message via AIM to Danny Diaz
Re: Connect Arduino to cRIO

Quote:
Originally Posted by Chiller View Post
How would I go about wiring my Arduino uno to the Digital Sidecar for use as a slave through I2C?
Grab an NXT cable and cut it in half. Wire the SCL / SDA pins into the cable for the Clock / Data lines, respectively (pinout). Connect the NXT plug into the gray NXT-like plug on the Digital Sidecar. Huzzah!

-Danny
__________________
Danny Diaz
Former Lead Technical Mentor, FRC 418
  #3   Spotlight this post!  
Unread 13-03-2014, 12:08
SteveGarward's Avatar
SteveGarward SteveGarward is offline
Red 5, standing by...
AKA: 7 years already
FRC #0111 (WildStang), FRC #3132 (Thunder Down Under)
Team Role: Mentor
 
Join Date: Dec 2009
Rookie Year: 2010
Location: Gurnee, IL
Posts: 173
SteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud of
Re: Connect Arduino to cRIO

Use ground as well to give the sidecar/robot a common ground with the Arduino.

Also, in your Arduino code, you will need to set the clock speed for the I2C (Wire) library to the same as the cRIO/sidecar. Add the following line to your code, PRIOR to the wire.h include:
#define TWI_FREQ 38400L
__________________
FRC Team 111 - WildStang (Mentor, Drive Coach)
FTC Team 7458 - Full Force! (Mentor, Coach)
FRC Team 3132 - Australia's FIRST FRC Team! (Holy crazy first year, Batman!)

  #4   Spotlight this post!  
Unread 13-03-2014, 13:00
Chiller Chiller is offline
Registered User
AKA: Connor Christie
FRC #4095 (RoXI Robotics)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 118
Chiller is on a distinguished road
Re: Connect Arduino to cRIO

Quote:
Originally Posted by SteveGarward View Post
Use ground as well to give the sidecar/robot a common ground with the Arduino.

Also, in your Arduino code, you will need to set the clock speed for the I2C (Wire) library to the same as the cRIO/sidecar. Add the following line to your code, PRIOR to the wire.h include:
#define TWI_FREQ 38400L
Would you happen to know if I need those pullup resistors?
  #5   Spotlight this post!  
Unread 13-03-2014, 13:33
SteveGarward's Avatar
SteveGarward SteveGarward is offline
Red 5, standing by...
AKA: 7 years already
FRC #0111 (WildStang), FRC #3132 (Thunder Down Under)
Team Role: Mentor
 
Join Date: Dec 2009
Rookie Year: 2010
Location: Gurnee, IL
Posts: 173
SteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud ofSteveGarward has much to be proud of
Re: Connect Arduino to cRIO

There are internal pullups on these lines in the sidecar, so you do not need to add additional pullups. Just connect the sidecar outputs directly to the Arduino A4/A5.
__________________
FRC Team 111 - WildStang (Mentor, Drive Coach)
FTC Team 7458 - Full Force! (Mentor, Coach)
FRC Team 3132 - Australia's FIRST FRC Team! (Holy crazy first year, Batman!)

Closed Thread


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 19:30.

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