|
Page 1 of 1
|
[ 6 posts ] |
|
NXT bypasses waitForStart() command
| Author |
Message |
|
recondelta090
Rookie
Joined: Fri Jan 13, 2012 5:17 pm Posts: 9
|
 NXT bypasses waitForStart() command
I am having troubles with my program. It is supposed to wait for the start of a match (using Samantha Field Control). Instead, it bypasses the waitforstart command. It also does it when it is not connected to either Samantha field control or the samantha. It usually starts around after 5 seconds to 15 seconds.
|
| Fri Jan 13, 2012 5:35 pm |
|
 |
|
MHTS
Guru
Joined: Sun Nov 15, 2009 5:46 am Posts: 1023
|
 Re: NXT bypasses waitForStart() command
I think you have hit the same bug as this thread. viewtopic.php?f=52&t=3777&p=16090&hilit=+Color+sensor#p16090It is supposed to be fixed by RobotC 3.05 which was released earlier today.
|
| Fri Jan 13, 2012 9:20 pm |
|
 |
|
recondelta090
Rookie
Joined: Fri Jan 13, 2012 5:17 pm Posts: 9
|
 Re: NXT bypasses waitForStart() command
It was actually the infrared sensor making it do that, but the new version should fix it.
|
| Sat Jan 14, 2012 11:19 am |
|
 |
|
recondelta090
Rookie
Joined: Fri Jan 13, 2012 5:17 pm Posts: 9
|
 Re: NXT bypasses waitForStart() command
The new vesion of RobotC does not fix it. But if you disable all the sensors, then reenable them after the waitForStart command, it cannot bypass the command.
The command to use to disable them is:
SensorType[nxt port] = sensorNone; In NXT port is where S1-4 goes
To enable them, use this command:
SensorType[nxt port] = sensorHiTechnicIRSeeker1200;
Where the sensor name is on the right is where you would put the sensor name
|
| Sat Jan 14, 2012 3:07 pm |
|
 |
|
MHTS
Guru
Joined: Sun Nov 15, 2009 5:46 am Posts: 1023
|
 Re: NXT bypasses waitForStart() command
There must be something else going on. Would you post your code?
|
| Sat Jan 14, 2012 5:22 pm |
|
 |
|
recondelta090
Rookie
Joined: Fri Jan 13, 2012 5:17 pm Posts: 9
|
 Re: NXT bypasses waitForStart() command
I can not post the code as we are currently in competition, but it's basically that you disable all sensors until the waitforstart() has been issued, then re-enable them for the rest of the program.
Works like a double failsafe, didn't 'fix' the problem, just found ourselves a workaround.
|
| Sat Jan 14, 2012 5:45 pm |
|
|
|
Page 1 of 1
|
[ 6 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 6 guests |
|
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
|
|