![]() |
Need help coding the jaguars
Last year I programmed our robot with the help of two mentors and another team member. Unfortunately this year the main programming mentor has moved away and the other mentor has been very busy the past week leaving me alone to handle the programming. It's only made harder by the fact that our computer with the code on it was stolen so I don't have any examples of how to write the code like we did last year.
Using the default example template I've managed to get most of the code properly written for our robot that currently only has a drive mechanism, however I can't get the jaguars attached to the cim motors to work properly. I have declared the jaguars but I'm not able to figure out how to add in the information for where each jag is connected. I've tried searching the provided guides and searching the internet but I've been unable to find anything that has worked. Whenever the robot is turned on the jags flash with a yellow light. Any help with the basic coding for the jaguars would be much appreciated! |
Re: Need help coding the jaguars
go to the part in the code where all the other objects have their location stated. for example the stick controller should have whatever the name is then parentheses next to it with a number.
drivingcontroller(1) in that area you need to add your jaguars and in parentheses next to it type in the number that matches what port it is plugged into on your i/o board. jaguarthefirst(1) or whatever number you are using. |
Re: Need help coding the jaguars
You need to find out how the Jaguars are connected to the cRIO. There are two ways. You are either connecting the Jaguars to the PWM channels or you are connecting them to a CAN bus by the RJ-12 cables. The way they are connected to the cRIO affects how they are programmed. If you are using CAN bus, you need to declare CANJaguar objects. If you are using PWM, then you declare Jaguar objects. What slot in the cRIO is your digital module plugged into? If your robot is 2-motor drive and you have an 8-slot cRIO with the digital module on slot 4 and connect them through PWM, then you need to declare the Jaguars like this:
Code:
class MyRobot: public SimpleRobot |
Re: Need help coding the jaguars
Hmm we are having problems also programming our robot.
Code:
We have not been able to get Autonomous nor Operator control going. We are constantly bombarded with an error about the digital module not being found, and something at line 26 of PWM.cpp. When we try autonomous or teleoperated nothing occurs.The robot does not move or anything. |
Re: Need help coding the jaguars
Quote:
|
Re: Need help coding the jaguars
oh thanks~ I read that somewhere? So, after placing the module in the second slot of the cRIO, will the simple template program run?
|
Re: Need help coding the jaguars
Quote:
|
| All times are GMT -5. The time now is 17:49. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi