Go to Post Anything is capable of happening in FIRST. - Dorienne [more]
Home
Go Back   Chief Delphi > Technical > Control System
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 12-21-2014, 11:06 PM
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
I2C working on RoboRIO

Today's effort was trying to get the I2C working on the RoboRIO. Evidently, the on-board I2C port is /dev/i2c-2 (that's the 3rd port of 3). We wanted to get a generic example of I2C code that could be extended to use any of the dozens of I2C sensors available from places like Sparkfun.

We first got a Linux only program running to prove the port was working at all. Then we ported the application to WPILib. The device was a Sparkfun ADXL345 3-axis accelerometer. Anyone interested in the code is welcome to a copy of both the Linux version and the WPILib version.

Drop by https://www.facebook.com/FRC2015ControlsBeta for a look at the hook up.
Reply With Quote
  #2   Spotlight this post!  
Unread 12-31-2014, 04:57 PM
DavidBlain DavidBlain is offline
Registered User
FRC #0839
 
Join Date: Nov 2014
Location: Agawam, MA USA
Posts: 7
DavidBlain is an unknown quantity at this point
Re: I2C working on RoboRIO

We would be interested in the code. do you have a link?
Reply With Quote
  #3   Spotlight this post!  
Unread 01-01-2015, 07:29 PM
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Re: I2C working on RoboRIO

Quote:
Originally Posted by DavidBlain View Post
We would be interested in the code. do you have a link?
Yes, here is the link to a copy on my dropbox:

https://dl.dropboxusercontent.com/u/...7/ADXL-I2C.zip

HTH
Reply With Quote
  #4   Spotlight this post!  
Unread 01-10-2015, 02:13 PM
mannybjh's Avatar
mannybjh mannybjh is offline
Registered User
AKA: Ben Hogan
FRC #0020 (Team 20)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Clifton Park
Posts: 3
mannybjh is an unknown quantity at this point
Re: I2C working on RoboRIO

Did you experience any issues with this? Trying to get info on it, not helping. Also, how did you find the addresses for it all. Like knowing to send to port 16 ect.

Last edited by mannybjh : 01-10-2015 at 02:26 PM.
Reply With Quote
  #5   Spotlight this post!  
Unread 01-10-2015, 02:31 PM
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Re: I2C working on RoboRIO

Quote:
Originally Posted by mannybjh View Post
Did you experience any issues with this? Trying to get info on it, not helping.
I'm sorry, I don't understand what you're asking here. The code is available from the link listed earlier in this thread.

You can see a picture of how it was connected at https://www.facebook.com/FRC2015ControlsBeta . Note that this is the Sparkfun ADXL345 board -- not the one found in previous KoP deliveries! For the KoP sensor, use the provided WPILib classes. Our I2C example code was just a way to demonstrate I2C on the RoboRIO from start to finish.

HTH
Reply With Quote
  #6   Spotlight this post!  
Unread 04-06-2015, 08:53 PM
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Re: I2C working on RoboRIO

Quote:
Originally Posted by taichichuan View Post
Yes, here is the link to a copy on my dropbox:

https://dl.dropboxusercontent.com/u/...7/ADXL-I2C.zip

HTH
Here is a copy for posterity.

HTH,

Mike
Attached Files
File Type: zip ADXL-I2C.zip (1.70 MB, 195 views)
Reply With Quote
  #7   Spotlight this post!  
Unread 02-04-2016, 04:59 PM
The Doctor's Avatar
The Doctor The Doctor is offline
Robotics is life
AKA: Hackson
FRC #3216 (MR. T)
Team Role: Programmer
 
Join Date: Mar 2014
Rookie Year: 2013
Location: United States
Posts: 139
The Doctor is on a distinguished road
Re: I2C working on RoboRIO

Quote:
Originally Posted by taichichuan View Post
Yes, here is the link to a copy on my dropbox:

https://dl.dropboxusercontent.com/u/...7/ADXL-I2C.zip

HTH
Link is broken.
__________________
Robots + Python + pentesting == me;
Blog ~ GitHub ~ Keybase
If you have a pressing issue to discuss with me, kik me at slush.puddles since I don't check CD very often.
Reply With Quote
  #8   Spotlight this post!  
Unread 02-04-2016, 06:31 PM
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Re: I2C working on RoboRIO

You can pick it up from the message just above it where I attached the zip file to the message.

HTH,

Mike
Reply With Quote
  #9   Spotlight this post!  
Unread 02-05-2016, 04:27 PM
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,547
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: I2C working on RoboRIO

Quote:
Originally Posted by taichichuan View Post
Note that this is the Sparkfun ADXL345 board -- not the one found in previous KoP deliveries! For the KoP sensor, use the provided WPILib classes.
This year, the ADXL345_I2C class was updated to take alternate address, like the Sparkfun board uses. Is there another reason the WPILib classes don't work?
Reply With Quote
  #10   Spotlight this post!  
Unread 02-05-2016, 05:13 PM
taichichuan's Avatar
taichichuan taichichuan is offline
Software Mentor
AKA: Mike Anderson
FRC #0116 (Epsilon Delta)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Herndon, VA
Posts: 328
taichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud oftaichichuan has much to be proud of
Send a message via AIM to taichichuan
Re: I2C working on RoboRIO

Quote:
Originally Posted by Joe Ross View Post
This year, the ADXL345_I2C class was updated to take alternate address, like the Sparkfun board uses. Is there another reason the WPILib classes don't work?
There shouldn't be. But, I haven't revisited this with the 2016 WPILib as of yet. If it works out of the box, please post that so others will benefit as well.

Thanks,

MikeA
Reply With Quote
Reply


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 03:44 AM.

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