View unanswered posts | View active topics It is currently Mon Sep 23, 2019 10:12 am

 Page 1 of 1 [ 4 posts ]
 Print view Previous topic | Next topic
Author Message
Rookie

Joined: Sun Jan 17, 2016 12:20 am
Posts: 6
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?

Sun Jan 17, 2016 12:41 am
Moderator

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

Thu Jan 21, 2016 10:35 am
Rookie

Joined: Sun Jan 17, 2016 12:20 am
Posts: 6
Re: Question About Cable Winding Mechanism
I am apologize for that because I didn't know where can I post the thread here

Fri Jan 22, 2016 12:37 am

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3654
Location: Rotterdam, The Netherlands
Re: Question About Cable Winding Mechanism

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]

Mon Jan 25, 2016 10:09 am
Display posts from previous:  Sort by
 Page 1 of 1 [ 4 posts ]

#### Who is online

Users browsing this forum: No registered users and 2 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ ROBOTC Applications    ROBOTC for LEGO MINDSTORMS       Third-party sensors    ROBOTC for CORTEX & PIC    ROBOTC for VEX IQ    ROBOTC for Arduino    Robot Virtual Worlds    Multi-Robot Communications    Issues and Bugs Competitions & Partners    Mini Urban Challenge    CS2N Robot Virtual Worlds Competitions       VEX Skyrise Competition 2014-2015       VEX Toss Up 2013-2014       FTC Block Party! 2013-2014    Competitions using VEX - BEST, TSA, VEX, and RoboFest!    FTC Programming    RoboCup Junior and Other ROBOT Competitions Virtual Brick Robotics Discussions    General Discussions    Project Discussions Off-Topic ROBOTC Forum & ROBOTC.net Suggestions/Feedback    ROBOTC Forums Suggestions/Comments    ROBOTC.net Suggestions/Comments       NXT Programming: Tips for Beginning with ROBOTC       VEX Programming: Tips for Beginning with ROBOTC    2013 Robotics Summer Of Learning       VEX Toss Up Programming Challenge       FTC Ring It Up! Programming Challenge    International Forums       Spanish Forums          ROBOTC for MINDSTORMS          ROBOTC for VEX       French Forums          ROBOTC pour Mindstorms          ROBOTC pour IFI VEX       Japanese Forums （日本語のフォーラム）       German Forums    2015 Spring Carnival Event    PLTW (Project Lead The Way)    Robotics Merit Badge    2014 Robotics Academy Summer of Learning