Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   Connect Arduino to cRIO (http://www.chiefdelphi.com/forums/showthread.php?t=127823)

Chiller 13-03-2014 11:38

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!

Danny Diaz 13-03-2014 11:49

Re: Connect Arduino to cRIO
 
Quote:

Originally Posted by Chiller (Post 1358568)
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

SteveGarward 13-03-2014 12:08

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

Chiller 13-03-2014 13:00

Re: Connect Arduino to cRIO
 
Quote:

Originally Posted by SteveGarward (Post 1358584)
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?

SteveGarward 13-03-2014 13:33

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.


All times are GMT -5. The time now is 10:29.

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