hey i m new to this site......
actually m makin a line follower robot based on d PID algorithm....
m gettin a few compile errors
pid_n_linefollower:78: error: stray '' in program
pid_n_linefollower:83: error: stray '' in program
pid_n_linefollower:86: error: stray '' in program
pid_n_linefollower:-1: error: expected initializer before 'current_position'
pid_n_linefollower:17: error: expected initializer before 'current_position'
ive attached d code ...
plz hlp me
thnxx in advance......
unsigned int RPM of Left motor = pwm – (Correction);
unsigned int  RPM of Right motor = pwm + (Correction);
You can't have spaces in variable names.
calculate current_position ();
What is this supposed to be/do?
if (error==0)
 {
 analogWrite (RPM of Left motor,3) && analogWrite (RPM of Right motor,5)
 }
 if (error < 0)                           // line follower algorithm
 {
  analogWrite (RPM of Left motor,3);
 }
Â
 if (error > 0)
 {
  analogWrite (RPM of Right motor,5);
 }
}
Putting the arguments in the correct order is useful, too.
thnxx 4 d reply .......
ive jus started with c and arduino n m nt a skilled c programmer....
bt m learnin frm u ppl thnxx a lot
Code:
calculate current_position ();
What is this supposed to be/do?
itz to calculate the current position of d robot in respect to d line.....
It's usually not very helpful to chase down every error the compiler produces - if you fix the first one, others will often vanish too. PaulS has pointed out a number of issues which you would be well advised to fix first. If you still have compiler issues then, post your amended code and the new error messages
analogWrite (RPM of Left motor,3) && analogWrite (RPM of Right motor,5)
Ignoring, for a moment, the spaces in the variable names, analogWrite doesn't return a value, so putting two in an expression like that doesn't make a lot of sense.
[analogWrite (RPM of Left motor,3) && analogWrite (RPM of Right motor,5)]
that was a mistake by me sry :blush: .........
bt ill try to fix d errors pointed by paulS