Go to Post An innovative strategy based off of good scouting beats a #1 alliance any day. - rufu5 [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 08-02-2012, 15:05
agartner01 agartner01 is offline
Captain + Control Sys & Design
FRC #4174
Team Role: Engineer
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Hector MN
Posts: 109
agartner01 is an unknown quantity at this point
Re: Live C++ help

Quote:
Originally Posted by mikets View Post
If you have a voltmeter, you can check the voltage between the +5 and the GND pins on the accelerometer to make sure it indeed gets power (in case you have bad connector). If you have an oscilloscope, check the SCK line, it should give you a train of square wave. No matter what color wires you hook it up, make sure +5 is connected to +5, Gnd to Gnd, SCL to SCL and SDA to SDA. By convention, +5 should be RED and Gnd should be BLACK.
Alright, I took the voltmeter to the pins on the accelermoneter and it did get power. I'll have to ask around to see if anyone has an oscilloscope.
Reply With Quote
  #17   Spotlight this post!  
Unread 08-02-2012, 16:38
agartner01 agartner01 is offline
Captain + Control Sys & Design
FRC #4174
Team Role: Engineer
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Hector MN
Posts: 109
agartner01 is an unknown quantity at this point
Re: Live C++ help

Alright, I'm going to try and use the gyro for what I need instead. I have no idea what up with the accelerometer
Reply With Quote
  #18   Spotlight this post!  
Unread 08-02-2012, 16:42
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Live C++ help

Did you try what Bob649 suggested? I think we connected to the other set of pins, not the one you showed in your picture.
__________________
Reply With Quote
  #19   Spotlight this post!  
Unread 08-02-2012, 16:49
agartner01 agartner01 is offline
Captain + Control Sys & Design
FRC #4174
Team Role: Engineer
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Hector MN
Posts: 109
agartner01 is an unknown quantity at this point
Re: Live C++ help

yeah... nothing changed. I did change the port to 2 in the code.
Reply With Quote
  #20   Spotlight this post!  
Unread 08-02-2012, 17:06
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Live C++ help

Quote:
Originally Posted by agartner01 View Post
I did change the port to 2 in the code.
What do you mean by that? Are you saying you specified module number 2 when instantiating the ADXL345 class? If so, do you really have two Digital modules in your cRIO and what slots are they plugged into?
__________________
Reply With Quote
  #21   Spotlight this post!  
Unread 08-02-2012, 17:08
agartner01 agartner01 is offline
Captain + Control Sys & Design
FRC #4174
Team Role: Engineer
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Hector MN
Posts: 109
agartner01 is an unknown quantity at this point
Re: Live C++ help

Quote:
Originally Posted by mikets View Post
What do you mean by that?
Bold = change.

accelerometer = new ADXL345_I2C(2, ADXL345_I2C::kRange_2G);
Reply With Quote
  #22   Spotlight this post!  
Unread 08-02-2012, 17:11
agartner01 agartner01 is offline
Captain + Control Sys & Design
FRC #4174
Team Role: Engineer
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Hector MN
Posts: 109
agartner01 is an unknown quantity at this point
Re: Live C++ help

I thought thats what you did to tell the crio which port the sensor was on (1= left sides, 2 = right side). How else would it know where it was?
Reply With Quote
  #23   Spotlight this post!  
Unread 08-02-2012, 17:12
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Live C++ help

Quote:
Originally Posted by agartner01 View Post
Bold = change.

accelerometer = new ADXL345_I2C(2, ADXL345_I2C::kRange_2G);
By putting a 2 there, you are saying you have TWO digital modules which means you must have an 8-slot cRIO and the second digital module must be inserted in slot 6 of the 8-slot cRIO and your accelerometer is connected to the I2C of the digital side car that is connected to the digital module in slot 6. Is that really your configuration?
__________________
Reply With Quote
  #24   Spotlight this post!  
Unread 08-02-2012, 17:14
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Live C++ help

Quote:
Originally Posted by agartner01 View Post
I thought thats what you did to tell the crio which port the sensor was on (1= left sides, 2 = right side). How else would it know where it was?
No, the left side and the right side set of pins are not modules. The '2' you specified is the "module number". That's the cRIO modules. I2C is a bus, you don't need to differentiate it.
__________________
Reply With Quote
  #25   Spotlight this post!  
Unread 08-02-2012, 17:23
agartner01 agartner01 is offline
Captain + Control Sys & Design
FRC #4174
Team Role: Engineer
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Hector MN
Posts: 109
agartner01 is an unknown quantity at this point
Re: Live C++ help

Quote:
Originally Posted by mikets View Post
No, the left side and the right side set of pins are not modules. The '2' you specified is the "module number". That's the cRIO modules. I2C is a bus, you don't need to differentiate it.
nope still nothing
Reply With Quote
  #26   Spotlight this post!  
Unread 09-02-2012, 08:41
msulaimain's Avatar
msulaimain msulaimain is offline
Registered User
AKA: Muhammad Sulaiman
FRC #3346 ([{Kamikaze Komets}])
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2009
Location: USA
Posts: 36
msulaimain can only hope to improve
Send a message via AIM to msulaimain Send a message via Yahoo to msulaimain
Re: Live C++ help

Hi, I have the following error on my driver station when I enable teleop:

ERROR: A timeout has been exceeded: RobotDrive...Output not updated often enough. ...in Check() in c:/Windriver/workspace/WPILib/MotorSafetyHelper.cpp at line 123

I have that error and it repeats continuously on the driver station.

I am deploying SimpleRobot example code.

Any solutions?
__________________
int main()
{
::::::::: include=>commitment;
::::::::: int=>school name=>Asheboro::High
::::::::: int=>team name=>Kamikaze::Komets;
::::::::: Priority_Queue=>FRC Championship::2012;
::::::::: Max_Element=>Teamwork;
}
Reply With Quote
  #27   Spotlight this post!  
Unread 14-02-2012, 18:38
tlemmons tlemmons is offline
Registered User
FRC #2083
 
Join Date: Dec 2011
Location: Evergreen, C)
Posts: 1
tlemmons is an unknown quantity at this point
Re: Live C++ help

I dont know if you got this working but looking at your pictures you are plugged into the pins that they call multipurpose I/O and not the I2C port. They is the four pins closest to the NXT connector.
Reply With Quote
  #28   Spotlight this post!  
Unread 14-02-2012, 22:15
agartner01 agartner01 is offline
Captain + Control Sys & Design
FRC #4174
Team Role: Engineer
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Hector MN
Posts: 109
agartner01 is an unknown quantity at this point
Re: Live C++ help

Could You provide a picture? I'm not sure what your talking about
Reply With Quote
  #29   Spotlight this post!  
Unread 15-02-2012, 01:32
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Live C++ help

That's the same thing as what we've been talking about. Look at your own picture. There are two columns of pins, the one closer to the NXT connector are the I2C pins. The other set of pins that you plugged into are actually something else.
__________________
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 12: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