error: 'Serial' does not name a type
this is my code for servo motor control. and i can not use the monitor to check the angle of the motor.
what is wrong ? how can i fix it ?
for a start don't hijack someone else's thread
then you have a wrong formatting of your code
--> read forum rules and messages at the top of the forum. that will get you started.
PS:
Serial.begin() needs to be in the setup() and bigin() does not exist...
Please read the post at the start of any forum , entitled "How to use this Forum".
OR http://forum.arduino.cc/index.php/topic,148850.0.html.
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.
Serial.bigin(9600);
Spelling error and in the wrong part of your code.
The Serial.println(p); line is always going to print the same value. It really won't help with debugging.
void loop()
{
int p;
for (p = 0; p <= 180; p = p + 1)
{
s1.write(p);
delay(25);
}
for (p = 180; p >= 0; p = p - 1)
{
s1.write(p);
delay(25);
}
Serial.println(p);
}