View Single Post
  #4   Spotlight this post!  
Unread 16-01-2017, 10:59
Jaci's Avatar
Jaci Jaci is offline
Registered User
AKA: Jaci R Brunning
FRC #5333 (Can't C# | OpenRIO)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Perth, Western Australia
Posts: 266
Jaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond repute
Re: CAN Interface Examples?

Generally, you don't want to communicate with your coprocessor via CAN, for a few reasons.

The Raspberry Pi doesn't natively support CAN, in fact, most processors don't. CAN is generally a pain to bit-bang, so you're going to want to use some extra circuitry to control and communicate with the CAN bus. This, combined with the lower speed and lower bandwidth, makes CAN less desirable over something more like ethernet.

If, however, you still want to pursue the project, you will have to use "HAL/CAN.h" header, or the "CANJNI.java" file. These contain the message sending, receiving and (for c++) the packing / unpacking of data.

CAN.h https://github.com/wpilibsuite/allwp...lude/HAL/CAN.h

CANJNI.java https://github.com/wpilibsuite/allwp...an/CANJNI.java
__________________
Jacinta R

Curtin FRC (5333+5663) : Mentor
5333 : Former [Captain | Programmer | Driver], Now Mentor
OpenRIO : Owner

Website | Twitter | Github
jaci.brunning@gmail.com
Reply With Quote