View unanswered posts | View active topics It is currently Wed Aug 12, 2020 2:57 pm

Reply to topic  [ 1 post ] 
Code Question 
Author Message

Joined: Mon Apr 04, 2016 3:23 pm
Posts: 1
Post Code Question
I am trying to code my robot to have a button that reverses motor movement. This would make driving the motor backwards feel like driving it forwards. My code is as follows:

task main()
while (1==1){

motor[port1] = vexRT[Ch2];
motor[port10] = vexRT[Ch3];

while (Btn8D == 1){
motor[port1] = vexRT[Ch2]*(-1);
motor[port10] = vexRT[Ch3]*(-1);

Compiler says that the 2nd while loop will always be false. I don't understand this. Any advice would be appreciated.

Mon Apr 04, 2016 3:26 pm
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 1 guest

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.