![]() |
Using Victors with RobotDrive
The students put together a robot and used Victors because they were smaller and there were plenty of them lying around. I had them change the code from the SimpleRobot template to use victors but the victors didn't run. They just blink like there is no communication.
I found this in the programming guide: By default the RobotDrive class assumes that Jaguar speed controllers are used. To use Victor speed controllers, create the Victor objects then call the RobotDrive constructor passing it pointers or references to the Victor objects rather than port numbers. The code looks like this. Shouldn't this have worked? If code is OK, I am going to have them check the power to the digital sidecar. Note: the relay does work. Code:
/** |
Re: Using Victors with RobotDrive
No, code-wise, that should work just fine.
Conventionally, things like that are passed in as pointers, but the constructor is overloaded such that it can take references instead, like you're doing (with no functional difference). The only thing I can think of would be modifying it to pass pointers. Code:
myRobot(&victor1, &victor2), |
Re: Using Victors with RobotDrive
All your code looks good. Just check the PWM hookups on the sidecar, and the hookup of the ribbon cable. If the relay works fine, the problem is not with power going to the sidecar. Maybe check the wiring of the victors...
|
| All times are GMT -5. The time now is 18:22. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi