Some useful NXC guides -
http://www.engineering.uiowa.edu/~cie/L ... torial.pdf
http://bricxcc.sourceforge.net/nbc/nxcdoc/
Did you get your program working yet?
motor problems
Re: motor problems
A sophistical rhetorician, inebriated with the exuberance of his own verbosity, and gifted with an egotistical imagination that can at all times command an interminable and inconsistent series of arguments to malign an opponent and to glorify himself.
-
- Posts: 7
- Joined: 07 Mar 2014, 23:29
Re: motor problems
hello
thanks for your help, im going to use the rotatemotor command instead as that does exactly what is want without the extra fuss.
I am having a problem though with a line follower program. I can get the robot to follow the line and turn but it wont turn back the other way.
im thinking that if i get it to turn so many degrees right and then back the other way twice as much it should find the line. i am having trouble setting the degrees and turning it the right amount
at the moment im using the example in the nxc tutorial pdf by Daniele benedettelli
#define THRESHOLD 40
task main()
{
SetSensorLight(IN_3);
OnFwd(OUT_AC, 50);
while(true)
{
if (Sensor(IN_3) > THRESHOLD)
{
OnFwd(OUT_A, 50);
Wait(100);
until(Sensor(IN_3) <= THRESHOLD);
OnFwd(OUT_AC, 50);
}
}
}
this is what i have been playing with. im thinking about trying to get the robot to turn using something other than the OnFwd command as i feel this doesn't really give you the turning control required. i will look further into the rotate motor commands. if anyone has any suggestions on this i would really appreciate the help!
thanks
simon
thanks for your help, im going to use the rotatemotor command instead as that does exactly what is want without the extra fuss.
I am having a problem though with a line follower program. I can get the robot to follow the line and turn but it wont turn back the other way.
im thinking that if i get it to turn so many degrees right and then back the other way twice as much it should find the line. i am having trouble setting the degrees and turning it the right amount
at the moment im using the example in the nxc tutorial pdf by Daniele benedettelli
#define THRESHOLD 40
task main()
{
SetSensorLight(IN_3);
OnFwd(OUT_AC, 50);
while(true)
{
if (Sensor(IN_3) > THRESHOLD)
{
OnFwd(OUT_A, 50);
Wait(100);
until(Sensor(IN_3) <= THRESHOLD);
OnFwd(OUT_AC, 50);
}
}
}
this is what i have been playing with. im thinking about trying to get the robot to turn using something other than the OnFwd command as i feel this doesn't really give you the turning control required. i will look further into the rotate motor commands. if anyone has any suggestions on this i would really appreciate the help!
thanks
simon
Who is online
Users browsing this forum: No registered users and 1 guest