|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
I2C advice
Hi everyone! I have been tasked with creating a master class (Java) for all things I2C because the last time we used it, the robot had some major lag issues, and once the sensor crashed the robot so hard it stopped moving during competition. The device I will be communicating with is the GY85 accelerometer/compass/gyro sensor. Is there anything I should know? Any fun stories? (Any and all information is appreciated!)
|
|
#2
|
||||
|
||||
|
Re: I2C advice
I've only heard of a couple teams that have gotten I2C to work well (besides the accelerometer). What I would personally do is get an arduino and a CAN shield and read the sensors using I2C on arduino and then send the data over CAN. I am on a Formula SAE team and we are doing something similar to this and it works really well.
Also, Teensy 3.1 has CAN built in (minus a microchip for the i/o for CAN) and that has something like 22 analog ins, so if you are reading lots of sensors (like the Formula team I am on) you could use that to read sensors too. Also, I love your name |
|
#3
|
|||
|
|||
|
ProTip: Learn binary and put the numbers on the System.out in netbeans so then its less calculation for the computer.
We got a MaxBotix I2C sonar sensor because our first sensor got shocked because we didn't keep it in the proper equipment. It worked well with little problems! |
|
#4
|
||||
|
||||
|
Re: I2C advice
I didn't think about using an Arduino, but that's a good idea!
I couldn't tell you how many times the sensor's been hot-plugged accidentally by the death spirals that were supposed to be a closed loop drive system! I can't believe it still works... |
|
#5
|
|||
|
|||
|
Re: I2C advice
Quote:
|
|
#6
|
||||
|
||||
|
Re: I2C advice
Quote:
![]() Quote:
Quote:
Quote:
|
|
#7
|
||||
|
||||
|
Re: I2C advice
Are you referring to a master I2C class, or a master GY-85 class? The FIRST I2C class kept hanging up the robot because it would start another transaction when another was already active. I'm just making this class to make sure that doesn't happen, and to make the code look cleaner and nicer to read in general.
|
|
#8
|
|||
|
|||
|
Re: I2C advice
Quote:
I'm surprised that the Java class allowed more than one write at a time to the I2C bus. I haven't looked to see if that is a bug or a misunderstanding. Certainly on the new roboRIO that should not be possible due to the Linux device driver that must be talked to on the new system. Your class should not need to deal with this level of synchronization. |
|
#9
|
||||
|
||||
|
Re: I2C advice
Sorry for my vague-ness. Words are hard
! |
|
#10
|
||||
|
||||
|
Re: I2C advice
Quote:
It seems like i2c isn't really fully developed on the cRIO or the roboRIO. Bit that's just what I have heard |
|
#11
|
|||
|
|||
|
Re: I2C advice
Quote:
Quote:
Speculation and FUD seems unhelpful. Perhaps we should stick to actual data and not hearsay? Especially when it comes to a system that's still in Beta, in the hands of 90 teams, and which has no current bugs filed against the I2C software from a quick glance at the Beta tracker. |
|
#12
|
||||
|
||||
|
Re: I2C advice
Quote:
|
|
#13
|
||||||
|
||||||
|
Re: I2C advice
There were a few problems with I2C on the cRIO that caused people problems.
Quote:
Quote:
|
|
#14
|
||||
|
||||
|
Re: I2C advice
Quote:
And I meant that I haven't heard of CAN crashing the whole robot. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|