Go to Post Avoid the impulse to shoot from the hip, and find out the full picture before deciding where you stand. - gblake [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 28-01-2006, 13:28
sirbleedsalot's Avatar
sirbleedsalot sirbleedsalot is offline
Registered User
FRC #0939
Team Role: Student
 
Join Date: Feb 2004
Location: New Effington South Dakota
Posts: 178
sirbleedsalot has a spectacular aura aboutsirbleedsalot has a spectacular aura aboutsirbleedsalot has a spectacular aura about
Re: easyC trouble

ok i've got my robot to drive and turn, using easyc to write the code, however i have another motor that i want to be able to turn on by pressing the trigger button on the joystick how do i write code for that, and that will turn the motor counter clockwise then if i release the trigger i want the motor to stop then if i press the thumb button the motor will turn clockwise, can someone give me detailed instructions.
__________________
our web site
  #2   Spotlight this post!  
Unread 02-02-2006, 08:10
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 586
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: easyC trouble

Quote:
Originally Posted by sirbleedsalot
ok i've got my robot to drive and turn, using easyc to write the code, however i have another motor that i want to be able to turn on by pressing the trigger button on the joystick how do i write code for that, and that will turn the motor counter clockwise then if i release the trigger i want the motor to stop then if i press the thumb button the motor will turn clockwise, can someone give me detailed instructions.
Inside the loop where you are driving the robot, you need to read the trigger inputs from the joystick and operate the motors.

To read the trigger inputs, use the "Digital OI Input" block. It returns a 1 or a 0 depending on the state of the trigger. You can check that value and then decide whether or not to drive the motor. To operate the motor, use the "PWM Control" block. It takes a PWM port number and a speed.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Closed Thread


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
EasyC v2.0 is mandatory for FVC! skimoose FIRST Tech Challenge 7 14-01-2006 18:37
Kickoff easyC workshop integrated into EasyC help file Dan Larochelle Programming 0 11-01-2006 06:12
EasyC v. 2.0 - New features, custom user functions, and more! artdutra04 FIRST Tech Challenge 1 02-11-2005 13:36


All times are GMT -5. The time now is 19:08.

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