ROBOTC.net forums
http://www.robotc.net/forums/

Winch program questions
http://www.robotc.net/forums/viewtopic.php?f=11&t=13191
Page 1 of 1

Author:  dsiford [ Wed Jan 20, 2016 11:05 am ]
Post subject:  Winch program questions

Attachment:
winch progam.c [555 Bytes]
Downloaded 419 times


Hello, first time poster. I am a new PLTW- Robot C teacher and have been trying to help the kids write a winch program. The program I have attached seems to be fine but will not work. It passes the compile and everything. Please help

Author:  Tabor473 [ Wed Jan 20, 2016 3:44 pm ]
Post subject:  Re: Winch program questions

dsiford wrote:
Attachment:
winch progam.c


Hello, first time poster. I am a new PLTW- Robot C teacher and have been trying to help the kids write a winch program. The program I have attached seems to be fine but will not work. It passes the compile and everything. Please help

So the problem is if the first button is pressed and the second is not you are running the motor at both 50 and 0 power. If I had to guess you see strange twitching behavior. The logic you want is
If(button)
Else if(other button)
Else

This ensures only event happens at a time.

Author:  dsiford [ Wed Jan 20, 2016 9:18 pm ]
Post subject:  Re: Winch program questions

Thank you very much for your help. I appreciate it.
I will re-write it and see what happens.
Thanks again

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/