|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
i2c java and arduino
We are trying to figure out how to read data from an arduino through i2c. We have three ultrasounds that are running on the arduino and probably can figure how to move the data to i2c on the arduino. I just haven't seen much on how to read the data from the cRio. The ultrasounds we are using are the ping ultrasounds from Parallax. Since they would have to be connected to at least two digital ports on the break out board per sensor, we thought arduino would be a good way to reduce the demand on that resource. Any suggestions?
|
|
#4
|
|||
|
|||
|
Re: i2c java and arduino
We have been using that thread for some ideas. Thanks for posting the code there. So far we have two arduinos talking to each other using i2c. The slave has three parallax ultrasounds and the master is simply collecting that data and printing the data to the serial monitor. Once we know that is working well, we will replace the arduino master with the cRio. Other than what needs to go in the constructor, it appears we many only need to use the read method in java to read three consecutive bytes that will represent the 3 distances on the three parallax sensors.
The whole system will read 5 sensors and the arduino will choose which three to send on to the cRio. Two of the three will be pointed at the side wall to help keep the robot moving straight during autonomous. Lots of other ways to do this but this seemed most interesting and a new challenge. |
|
#5
|
||||
|
||||
|
Re: i2c java and arduino
We are trying to get i2c working as well. It looks possible. We are going to try and put LED's that signal whether our robot is lined up for a shot, if we need a ball from the human player, random decorations, and stuff like that.
The vision processing will be on the driver station, then whether we are lined up will be passed to the CRIO then to the Arduino which will turn on the lights. We have a bunch of addressable lights that we want to put on. BTW, does anybody know if we are aloud to put capacitors on the strips of lights? I don't want the lights dimming when we accelerate the robot. |
|
#6
|
||||
|
||||
|
Re: i2c java and arduino
Quote:
Code:
R72
A noise filter may be wired across motor leads or PWM leads. Such filters will not be considered CUSTOM CIRCUITS and will not be considered a violation of R53 or R71.
Acceptable signal filters must be fully insulated and must be one of the following:
A one microfarad (1 µF) or less, non-polarized, capacitor may be applied across the power leads of any motor on your ROBOT (as close to the actual motor leads as reasonably possible).
Last edited by eddie12390 : 05-02-2014 at 10:21. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|