Go to Post Wow... no duct tape? - Stormnnormn [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 2 votes, 4.00 average. Display Modes
Prev Previous Post   Next Post Next
  #6   Spotlight this post!  
Unread 02-17-2011, 12:15 AM
garyk garyk is offline
Programming Mentor: 668, 972, 2643
FRC #0668 (Apes of Wrath)
Team Role: Mentor
 
Join Date: Dec 2006
Rookie Year: 2005
Location: Santa Clara (Silicon Valley) Calif.
Posts: 87
garyk is a jewel in the roughgaryk is a jewel in the roughgaryk is a jewel in the roughgaryk is a jewel in the rough
Re: Sample code for Windriver needed (FRC)

Quote:
Originally Posted by pacerobotics View Post
Help Please!!!
Thanks
I've posted a complete C++ program here: http://www.chiefdelphi.com/forums/sh...11#post1024111

It incl. arcade drive, I understand you want to write your own drive code. The code shows how to read (obtain) the values from a joystick and drive a Jaguar/Victor with that value. Joysticks give a value between 1.0 and -1.0, inclusive, in the X, Y, and Z axies. (The Z axis is the throttle thing at the base of the JS.)

Victors and Jaguars accept values -1.0 <= x <= 1.0. The direction of rotation is a function of how the motor is wired and the nature of the gearbox.

The algebra in between the JS and the Jaguar is up to you :-)

Whenever you change the drive code (incl. the first version) YOU MUST TEST WITH YOUR ROBOT ON BLOCKS with the wheels off the ground. There's a real risk of the motors being powered other than as you expect and the robot smashing into an object - I've seen it happen.
__________________

Silicon Valley Regional 2005, 2006 972
Silicon Valley Regional 2007 668 Xerox Creativity Award
Championship Event 2007 668
Portland Regional 2008 668
Silicon Valley Regional 2008 668, 972
Beta Test Team 2008 668 (with 100 & 254)
Silicon Valley Regional 2009 668 Regional Chairman's Award; 2643
Sacramento Regional 2009 668 Winning Alliance (thanks, 1717 & 2473!), 2010 Winning Alliance 3256
CalGames 2006, 2007, 2008, 2009, 2010, 2011 Field Tech
NorCal FTC Regional 2008, 2009 Inspector
Championship Event 2009
San Diego, Silicon Valley Regionals; Champ. Event 2010 668, 2643, 3256
Silicon Valley, Madera Regional 2012 2643
WRRF Programming Instructor 2006-2015
Regional Woodie Flowers Award 2014 2643 Utah Regional

Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:24 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi