Thread: 2CAN C# Example
View Single Post
  #1   Spotlight this post!  
Unread 02-05-2010, 22:50
ozrien's Avatar
ozrien ozrien is offline
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 522
ozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond repute
2CAN C# Example

I have posted a Visual Studio 2005 C# example that can be used to control Jaguars using only a 2CAN. The app sockets to the 2CAN and sends voltage throttles over UDP. The 2CAN then in turn updates the Jaguars on the bus. The throttles are read from an attached USB Gamepad or Joystick. This is basically the example that was demoed at the AndyMark booth at Atlanta.

The entire solution (with release built exe) can be downloaded by clicking the "C# Application Example (Updated 5/2/2010)" link at...
http://www.crosstheroadelectronics.com/2CAN.htm

For those of you interested in creating your own apps I recommend looking at 2CANComm.cs as it has the c# and C style definition of the data sent to the 2CAN. A formal communication spec is in the works. Hopefully this will suffice in the meantime.

Be sure to use the non-FIRST Jaguar firmware. I have been using Jaguar version 5450 and 2CAN version 1.6. Also be sure to read through the ReadMe.txt file as it contains important information for compiling/debugging the C# app.