Take the 2-minute tour ×

This question is FRC related. I have OpenCV Code that will auto aim and fire a ball into the goal. My question is how can I load it onto the CRio (Robot). There are a couple of options I see.

  1. Use something like raspberry pi to handle vision (I don't know how to do that)

  2. Get the image from the driver station, processes everything, than send the motor values.

  3. Load the code directly on the robot ("will show down the bot so i dont want to do this nor do i know how)

Compaction is in a few days so a quick response would be GREATLY GREATLY VALUED!

share|improve this question

1 Answer 1

I am the senior programmer student from Team 2730. Sorry I couldn't answer this before the season ended this year. First you should install OpenCV on a Raspberry Pi with http://damnfineraspberrypi.com/install-open-cv-on-your-pi-for/. It's pretty strainght forward as most of the installing and setup can be done with a few console commands and a python IDe is already present. Then download the library at http://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-gpio. This will allow you to send analog output to a cRio which can be read with an AnalogChannel object using the pins on the Pi. You could, for example, use a channel to send the rotation needed to aim towards the target, returning 0 if no target is present.

share|improve this answer
No no thank you soon much. I was pretty lost. We just had our regional at mertal beach and we didn't place. We were fortunate enough this year to be able to afford to go to a second regional in about a month. You mentioned A python ide. My code is written in java. Does it have to be in python? –  Qslick Mar 5 at 0:16
We're actually in the same situation. We finally get to go to two this year. Java will run on a raspberry pi but you will have to compile it on the pi with their IDE. Use this library to transmit to the cRio <pi4j.com/>;. –  Liamdev631 Mar 5 at 0:46

Your Answer


