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

Question About Cable Winding Mechanism
http://robotc.net/forums/viewtopic.php?f=52&t=13145
Page 1 of 1

Author:  SWEETMUSK [ Sun Jan 17, 2016 12:41 am ]
Post subject:  Question About Cable Winding Mechanism

we have the project that is due next week Friday
Cable Winding Mechanism
A telecommunications contractor need you team design a device that can accurately wind up a specific length of cable.
The device must be able to wind a specific length consistently. The device must also be able to be started and stopped(emergency) by using a switch.

what I think is:
I want to start the motor when I press bumb1
the motor will go -63 and 63 depends the value of SONAR<30 and SONAR>=30
If the length is 60, then will go up by auto. And if the length is 20, then it will go down by auto.
The bumb2 will stop the Motor no matter when the length is at
when I press the bumb2 again the motor will start again
*We have thing that is on the rope, so the Sonar will knows how far is it. But it has +-2cm
*We have to stop the motor first before we change the direction

this is what I wrote:
Code:
   while(1==1)
   {
      if(SensorValue(bump1)==1   &&   SensorValue(SONAR)<30)
      {
         stopMotor(Motor);
         wait(0.2);
         startMotor(Motor, -63);
      }
      if (SensorValue(bump1)==1 && SensorValue(SONAR)>=30)
      {
         stopMotor(Motor);
         wait(0.2);
         startMotor(Motor, 63);
      }
      while(SensorValue(SONAR)>=60)
      {
         stopMotor(Motor);
         wait(0.2);
         startMotor(Motor,63);
      }
      while(SensorValue(SONAR)<=20)
      {
         stopMotor(Motor);
         wait(0.2);
         startMotor(Motor,-63);
      }
      if(SensorValue(bump2)==1)
      {
         stopMotor(Motor);
      }
   }

is this right?

Author:  Tabor473 [ Thu Jan 21, 2016 10:35 am ]
Post subject:  Re: Question About Cable Winding Mechanism

I believe this is a duplicate of a post in the cortex section and it is being addressed there.

Author:  SWEETMUSK [ Fri Jan 22, 2016 12:37 am ]
Post subject:  Re: Question About Cable Winding Mechanism

I am apologize for that because I didn't know where can I post the thread here

Author:  mightor [ Mon Jan 25, 2016 10:09 am ]
Post subject:  Re: Question About Cable Winding Mechanism

Topic locked to prevent additional comments

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