View unanswered posts | View active topics It is currently Fri Oct 18, 2019 4:45 pm






Reply to topic  [ 3 posts ] 
Winch program questions 
Author Message
Rookie

Joined: Wed Jan 20, 2016 10:57 am
Posts: 2
Post Winch program questions
Attachment:
winch progam.c [555 Bytes]
Downloaded 271 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


Wed Jan 20, 2016 11:05 am
Profile
Moderator
Moderator

Joined: Tue May 19, 2015 3:07 pm
Posts: 91
Post 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.


Wed Jan 20, 2016 3:44 pm
Profile
Rookie

Joined: Wed Jan 20, 2016 10:57 am
Posts: 2
Post 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


Wed Jan 20, 2016 9:18 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 2 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

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.