Posted by Justin Stiltner.
Student on team #388, Epsilon, from Grundy High School and NASA, American Electric Power, Town of Grundy.
Posted on 1/30/2000 10:53 PM MST
I hope sombody knows how to accomplish this
I need to be able to control a pwm with a button and a joystick, specifically I need to be able to move the joystick and have the motor respond normally but when the top button is pressed the motor should go to full speed in whatever direction the joystick is in or foward if the joystick is centered
I think I have figured out how to do this but I wont get to find out untill tomarrow.
also what is the function and what does each part of the serout command mean??
Justin Stiltner
Team 388
Posted by Joe Johnson. [PICTURE: SAME | NEW | HELP]
Engineer on team #47, Chief Delphi, from Pontiac Central High School and Delphi Automotive Systems.
Posted on 1/31/2000 5:31 AM MST
In Reply to: Programming posted by Justin Stiltner on 1/30/2000 10:53 PM MST:
Justin,
I think that this is not all that difficult.
Basically, you need a few IF statements.
Something like:
.
.
.
IF (THUMB1.eq.1) then MaxSpeed
Goto NoThumb
MaxSpeed:
if (Y1.gt.127) then FullAhead
FullRev:
Y1=00
Goto NoThumb
FullAhead:
Y1=254
NoThumb:
.
.
.
.gt. = greater than
.eq. = equal
(html sometimes gets confused if we use the real symbols)
Hope this helps.
Joe J.
Posted by Russell Pauley.
Coach on team #344 from Phoebus High School.
Posted on 1/31/2000 6:36 AM MST
In Reply to: This is not too hard to do posted by Joe Johnson on 1/31/2000 5:31 AM MST:
Innovation First has a paper on there web site that gives you the code to run a PWM with a button.
Russell
: Justin,
: I think that this is not all that difficult.
: Basically, you need a few IF statements.
: Something like:
: .
: .
: .
: IF (THUMB1.eq.1) then MaxSpeed
: Goto NoThumb
: MaxSpeed:
: if (Y1.gt.127) then FullAhead
: FullRev:
: Y1=00
: Goto NoThumb
: FullAhead:
: Y1=254
: NoThumb:
: .
: .
: .
: .gt. = greater than
: .eq. = equal
: (html sometimes gets confused if we use the real symbols)
: Hope this helps.
: Joe J.
Posted by Justin Stiltner.
Student on team #388, Epsilon, from Grundy High School and NASA, American Electric Power, Town of Grundy.
Posted on 1/31/2000 11:59 AM MST
In Reply to: Re: This is not too hard to do posted by Russell Pauley on 1/31/2000 6:36 AM MST:
I have theyr paper but cannot determin where to put the code at in the paper it says somthing about declaring pwm12 and then adding it to the serout command
I was thnking that by doing this Iwould not be able to control the pwm with the stick also
Justin Stiltner
Team 388
Posted by Justin Stiltner.
Student on team #388, Epsilon, from Grundy High School and NASA, American Electric Power, Town of Grundy.
Posted on 1/31/2000 8:31 PM MST
In Reply to: Re: This is not too hard to do posted by Justin Stiltner on 1/31/2000 11:59 AM MST:
Thanks to everybody that has helped me I have it working now
Keep up the good work
Justin Stiltner
Team 388
Posted by Jerry Eckert.
Engineer from Looking for a team in Raleigh, NC sponsored by .
Posted on 1/31/2000 9:59 AM MST
In Reply to: Programming posted by Justin Stiltner on 1/30/2000 10:53 PM MST:
: I hope sombody knows how to accomplish this
: I need to be able to control a pwm with a button and a joystick, specifically I need to be able to move the joystick and have the motor respond normally but when the top button is pressed the motor should go to full speed in whatever direction the joystick is in or foward if the joystick is centered
: I think I have figured out how to do this but I wont get to find out untill tomarrow.
: also what is the function and what does each part of the serout command mean??
Try this:
IF (p1_sw_top = 0) then skip_full_drive
LOOKDOWN drive,
Posted by Jerry Eckert.
Engineer from Looking for a team in Raleigh, NC sponsored by .
Posted on 1/31/2000 3:18 PM MST
In Reply to: Re: Programming posted by Jerry Eckert on 1/31/2000 9:59 AM MST:
: IF (p1_sw_top = 0) then skip_full_drive
: LOOKDOWN drive,