|
Page 1 of 1
|
[ 3 posts ] |
|
Start, Reverse, Stop on one button?
| Author |
Message |
|
wrsergeant000
Rookie
Joined: Fri Jan 11, 2013 7:49 am Posts: 2
|
 Start, Reverse, Stop on one button?
I'm a PLTW teacher and recently went to one of the Vex competitions in my area and saw that one team had their controller set up so that if they pushed a button on the controller and let go, a motor would run infinitely. They could also stop the motor, set it at a different speed, and put into reverse by doing the same thing with other buttons. A small group of students that I am taking to compete next week wants to do the same thing, but I don't know what the code would be. Any help?
|
| Fri Jan 11, 2013 10:45 am |
|
 |
|
magicode
Moderator
Joined: Tue Sep 14, 2010 9:19 pm Posts: 494
|
 Re: Start, Reverse, Stop on one button?
Here is some pseudocode to get you started. It can be optimized more, but this will give you a general idea:
_________________ sudo rm -rf /
|
| Fri Jan 11, 2013 11:58 am |
|
 |
|
wrsergeant000
Rookie
Joined: Fri Jan 11, 2013 7:49 am Posts: 2
|
 Re: Start, Reverse, Stop on one button?
Thank you so much! I put that up on my projector and my students saw that and got straight at it. They loaded it onto the Cortex and it works the way that they wanted it to. 
|
| Fri Jan 11, 2013 7:26 pm |
|
|
|
Page 1 of 1
|
[ 3 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 0 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|