Go to Post I'd also like to apologize to any of the teams whose robots we may have broken. - Ginger Power [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Spotlight this post!  
Unread 16-01-2002, 23:01
Joseph F Joseph F is offline
Registered User
#0506 (Steel Friars)
 
Join Date: Jan 2002
Location: New York
Posts: 59
Joseph F is an unknown quantity at this point
Send a message via AIM to Joseph F
Quote:
If p1_trig = 0 then DoNothing
Left_wheels = 254 - (Left_wheels MAX 254)
Right_wheels = 254 - (Right_wheels MAX 254)
DoNothing:
The above is probably the simplest way to do it. I tend to drag it out more in my program simply because I like to see the thinking process. However you have to then tell it what right_wheel and left_wheel are. I presume there pwm1 and pwm2 as listed in tankdrive. Make sure to put this just after the tankdrive section.

Quote:
Left_wheels = ~Left_wheels
Right_wheels = ~Right_wheels
This may work. I'm not exactly sure about negations in pbasic. It could end up attempting to put in a negative... Use it at your own risk.


The code I put in is untested but shows exactly what it does step by step. Its probably not the best but it should work. Just try them 1 at a time and see which one you like. A standard 2 position switch, a button on the joystick, or even the wheel on the joystick can be used to control which way it drives.

If you have specific questions on the pbasic editor you can post them here or feel free to e-mail me. I taught myself how to use it and the basic program commands in under a week so it shouldn't be that hard to help you if you need.
__________________
One Team, One Bot, One Fleet of Ambulances!
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i control a piston with a joystick Ryan Foley Programming 2 27-05-2003 17:13
Fried program slots? Jeff Waegelin Programming 18 19-03-2003 18:08
question about one joystick drive programing james700 Programming 13 29-01-2003 14:49
robot goes haywire with the one joystick default code Miles Programming 7 24-01-2003 14:58
joystick problem archiver 2000 12 23-06-2002 23:08


All times are GMT -5. The time now is 12:44.

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