Go to Post Remember, FIRST is about people. Robots are just what bring us all together... - Matt Attallah [more]
Home
Go Back   Chief Delphi > Technical > Programming
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
  #1   Spotlight this post!  
Unread 06-07-2016, 15:34
CSkillet CSkillet is offline
Registered User
FRC #0135
 
Join Date: Jan 2016
Location: Indiana
Posts: 4
CSkillet is an unknown quantity at this point
I2C Communication between RoboRIO and Arduino

Hello,
So I've been trying to send data from the RoboRIO to the Arduino UNO using the Transaction() function of the I2C Class of the C++ WPILib. I have the address all connected, because AddressOnly() returns false, meaning a success. However, Transaction() returns true, meaning the process aborted, and that's my problem. It's not a problem on the Arduino side because its not receiving any data at all.
I have switched off and on between using the built in I2C port and the MXP port on the RoboRIO, but neither have worked. I have the SDA, SCL, and Ground pins set up, but not the voltage, as the Arduino would not operate at 3.3V. Moreover, I just have the Arduino plugged into a computer. I would assume the wiring is good because the RoboRIO can sense that there is a device at the Arduino I2C address.

Here is some of the code on the RoboRIO side:

Header File (.h):

char START_INDICATOR = 'S';
unsigned char byteDataToSend;
unsigned char* CONVERTED_START_INDICATOR;

.cpp File

CONVERTED_START_INDICATOR = new unsigned char;

byteDataToSend = reinterpret_cast<unsigned char&>(START_INDICATOR)
CONVERTED_START_INDICATOR = &byteDataToSend;

i2C->Transmission(CONVERTED_START_INDICATOR , 1, NULL, 0)


Any help is appreciated, thanks
Reply With Quote
 


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 09:42.

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