I want to know if Arduino directly connect to cRio or it has to go to digital sidecar before the cRio. Thanks!
How are you trying to use your arduino, to control motors and outputs? Because then it wouldn’t be practical to use the c-rio in conjunction with an arduino, you can use the arduino directly as a replacement for the c-rio.
yeah for motor and outputs, well basically we’re just researching for it.
In the offseason, yes, that would work.
In the competition season, at least in the past, that has been prohibited. In 2011, the rule was <R57>. In short, signals controlling motors had to come from the Digital Sidecar on the cRIO–no other sources were allowed.
In the offseason, yes, that would work.
In the competition season, at least in the past, that has been prohibited. In 2011, the rule was <R57>. In short, signals controlling motors had to come from the Digital Sidecar on the cRIO–no other sources were allowed.
thanks, I didn’t even know, just new here
You can use an Arduino for other, non prohibited things if you want though. FIRST gives us a lot of free reign for “custom circuits and sensors.” So if there’s something you know how to do on Arduino but can’t find out how to do it on the FIRST control system, you could have the Arduino do the work and the cRIO would just receive or send commands. I guess you could hook Digital I/O pins together and have the cRIO and Arduino send and listen for dedicated On/Off signals along one or more pairs of pins.
Cons are that you can’t use the Arduino to control motors, as mentioned, and that having two systems could easily be more complicated than just using the main FIRST control system. It would depend a lot on what you wanted to do with the Arduino.
I’ve always wanted to use a custom circuit though; it would be pretty cool.
Yep, RoboMaster has it right. As long as you aren’t directly controlling motors with the Arduino, or doing something else that’s prohibited by the rules, knock yourself out. Also, during the offseason, play with what you want to controls-wise.
If I were to connect an Arduino to a cRio, I would do it via the Serial port. This requires an RS232 level shifter (to 5v TTL logic of the Arduino), but is probably the easiest way on both ends.
But in normal competition setup you can’t use the serial port. It only sends out basic status information about the cRIO. You would have to change some default stuff, which I think would be easier said than done, and then revert for competitions. Plus, the recent cRIOs don’t even have a serial port, right? (I might be wrong on that).
All false.
The serial port is a valid port (on both cRio’s), there were no 2011 rules prohibiting its use.
It’s available in code as a standard VISA serial port with WPI wrapper in LabVIEW. I would assume it’s available in other languages similarly.
You would have to flip the Console Out DIP switch, but that’s not very hard to do.
Huh, wow, thanks then for correcting me. Maybe it wasn’t available in previous years, maybe 2009 when the system first came out or something.
This might be helpful, I don’t know if you can run these VIs on the cRIO.
http://web.me.com/iklln6/automation/LabVIEW.html
We used an Arduino in 2011 to read encoders and the transmit distance travelled during auton.
The Arduino directly read the encoders and talked to the cRIO via serial.
This worked great. We’ll be doing another Aruino project in 2012.
Our team was recently trying to get the Arduino to work on the cRIO.
Is there anything special we need to do?
I just read above we needed to flip the DIP switch?
Our programmer (JAVA) was working on this and was getting unexpected errors.
just to be sure… so is there any limit/prohibitions on what we can use on the arduino?
[spoiler=]Thanks all for the replies [/spoiler]
Can you be more specific? Do you mean, what you can add on to the board for more features like other wireless, or what you can attach and control/sense?
^Reported^
Any reason you decided to use the Arduino for this purpose rather than jsut connecting the encoders directly to the cRIO?
Any reason you decided to use the Arduino for this purpose rather than jsut connecting the encoders directly to the cRIO?
We have included projects like this for the last few seasons to involve more students in programming for the robot and to add additional languages to our training program.
In most seasons we have about two students who really become the lead programmers for the comp robot. In order to sustain a larger group and have their work be meaningful we have added components like the Arduino.
We try to pick something useful yet achievable by a group of students with little oversight. Last year’s encoder reading was a success, though we stopped using it before Worlds because of some unknown and possibly unrelated errors. Regardless those students were proud of their work and had a featured component on the robot that otherwise would not have existed.
In past year’s, when we’ve had mentors with PCB design experience we have tried things like a hardware based PID board that used SPI to talk to the main controller.
This year we plan to use it the Arduino again, though the scope of the project isn’t defined.
I’m assuming you used the Arduino as a spi slave. You wouldn’t happen to have a library for the Arduino as a slave that you could point to or share?
Why don’t you have the students do a bit of software engineering as a team and have them all write code on the Crio alone, and simply break portions of it up into chunks that each student works on, rather than separating the platforms and making things more complicated?