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

Green highlighted line of code?
http://www.robotc.net/forums/viewtopic.php?f=11&t=12659
Page 1 of 1

Author:  jwagnerroom42 [ Wed Dec 02, 2015 11:23 am ]
Post subject:  Green highlighted line of code?

When running a program, RobotC gets "stuck" on one line of command with a green arrow and green highlighting of the command on the line. No information is given at the bottom as to why. The program will not run past that point, or run at all when that command is highlighted. I've copied and pasted the program in new files, and same thing. What's happening?

Author:  JohnWatson [ Thu Dec 03, 2015 10:24 am ]
Post subject:  Re: Green highlighted line of code?

We'd need to see the code in order to determine what the cause of the issue is; it's most likely being caused by something holding the program flow, such as a loop or a blocking command. Please post your code using the [code] tags (and let us know which line specifically is encountering the issue), and we'll be more than happy to take a look at it for you.

Author:  jwagnerroom42 [ Thu Dec 03, 2015 11:45 am ]
Post subject:  Re: Green highlighted line of code?

The program freezes up on this program with startMotor(port6, 32); However, all of my students are having this issue in different places in their programs. I was thinking it is an issue with the software, or how we have it configured, or how we are running the program.

task main()
{
robotType(recbot); // We are using the recbot.

startMotor(port6, -32); // Set motor port 6 to speed -32.
untilPotentiometerLessThan(560); // Wait until the potentiometer reads a value LESS than 560.
stopMotor(port6); // Stop motor port 6.

waitInMilliseconds(1000); // Wait 1.0 seconds.

startMotor(port6, 32); // Set motor port 6 to speed 32.
untilPotentiometerGreaterThan(1000); // Wait until the potentiometer reads a value GREATER than 1000.
stopMotor(port6); // Stop motor port 6.
}

Author:  Asim Poptani [ Thu Dec 03, 2015 3:51 pm ]
Post subject:  Re: Green highlighted line of code?

I have never used this sort of code however try putting robotType(recbot); above task main(){.

I hope this solves the problem.

Asim

Author:  jwagnerroom42 [ Fri Dec 04, 2015 4:44 pm ]
Post subject:  Re: Green highlighted line of code?

Thanks, but I removed that line of code and manually input the motors and sensors. Still freezing with a green highlight and arrow, not allowing the code to run.

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