Pro's:
- Wiring can be a little easier, and you don't take up a bunch of PWM outputs on the digital sidecar (important if you would otherwise be using more than 10 of those - without CAN you would need a second digital sidecar)
- You can have direct feedback into the Jaguars for your sensors, like the encoders. This can be important if you have a lot of sensor feedback on the robot - having an encoder go into a Jaguar frees up 2 of your 14 digital I/O's on the digital sidecar.
Con's:
- You have to make or find your own wires - it's not as simple as using the PWM's that came in the KoP
- CAN can be tricky to setup initially (you have to assign each jaguar a separate address)
How to wire:
Check out the Jaguar documentation here:
http://www.ti.com/lit/ug/spmu022c/spmu022c.pdf
If you scroll through far enough, you'll see a section dedicated to the CAN wiring.
- To start, the KoP this year came with a DB9/RJ12 Adapter. You need to hook this up correctly so you get the correct pins attached to the correct places. I recommend incorporating your terminator into the adapter - a 100-ohm resistor hooked up to the middle two pins of the RJ12 jack.
- Once that's done, you essentially "daisy chain" the jaguars together - you run a 6-conductor phone cable from the Adapter to the first jaguar, then can use 4-conductor from that jaguar to the next, and again to the next, etc. At the end, you need a terminator, which is a 100-ohm resistor hooked up to the middle two pins of the phone connector.
How to program:
For Java (and probably for everything else, too), there is a special Jaguar class for use with CAN. You simply use it instead of the normal Jaguar class.
You will need to use the jaguar CAN interface on your computer (through a special cable you'll need to make) to program the Jaguars with the correct addresses. Details for that are in the documentation linked above.