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

Sunner of Learning-VEXIQ-Sensors-Self-Sensing Arm Programmer
http://www.robotc.net/forums/viewtopic.php?f=69&t=9165
Page 1 of 1

Author:  TheMechanic [ Thu Jul 31, 2014 9:42 pm ]
Post subject:  Sunner of Learning-VEXIQ-Sensors-Self-Sensing Arm Programmer

I am unable to complete this challenge because I can't get the robot to move once the arm has pressed the sensor.

MoveMotor(-315)degrees(50)
WaitUntil(BumperSensorvalue)(=)(1)
Forward(5)(rotations)

Author:  parkway [ Fri Aug 01, 2014 8:07 am ]
Post subject:  Re: Sunner of Learning-VEXIQ-Sensors-Self-Sensing Arm Progra

Hello,

Looking at your code, you are telling the arm motor to move a specific amount (-315 degrees), but then you are telling it to wait until the touch sensor is pressed. So, you want the arm to move until the touch sensor is pressed. Your moveMotor command does not do this; instead, it gives it a specific distance to move. What you want to do is turn the motors on, and keep them on until the touch sensor is pressed. Instead of using the moveMotor command, try using the setMotor command.

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