12-02-2015 06:53 PM
Hello,
We are trying to develop a system for connecting many arbitrary sensors to the RoboRIO for FRC.
Is there a current standard method of connecting a Teensy microcontroller (or similar microcontroller) to the RoboRIO's CAN bus to access via WPILib? We decided on the Teensy because it had built in CAN controller.
We had trouble with I2C over long distances and would prefer to avoid networking as it is not real time and the 2016 router only has one extra port. The RoboRIO's FRC FPGA image only offered one UART port, which we do not think will be enough (we can use the Teensy's to connect to arbitrary sensors), in addition to being slower than the CAN bus for large data transfers.
Thank you
12-02-2015 06:59 PM
I'm not sure what language you are using, but at least in LabVIEW there is a CAN API for accessing the bus directly. You could use that to talk to your micro, but you would want to select arb IDs that fit into the scheme originally layed out by Luminary Micro (if you want to coexist with FRC CAN devices).
12-02-2015 07:36 PM
We are using Java.
We found the CANJNI FRCNetworkCommunicationCANSessionMuxSendMessage and FRCNetworkCommunicationCANSessionMuxReceiveMessage, but other functions seem to be unavailble.
12-02-2015 07:45 PM
What other functions do you need? The only others even provided by the driver are a stream capture API for not missing consecutive messages received with the same arb id. And since you are in control of the messages on your mirco, you could just avoid doing that. The send and receive are all you should need.