Arduino controlling servo using bluetooth

Hi Guys. Please help. Completely new to this.This the code for what i want to make below.However the software tells me this,

sketch_jun09a:21:5: error: expected '}' at end of input
exit status 1
expected ';' before '}' token

what do i do?Many thanks.

#include<SoftwareSerial.h>
#include <Servo.h>
Servo myservo;
SoftwareSerial mySerial(2, 3); // RX, TX
int Position ;

void setup()
{
myservo.attach(11);
mySerial.begin(9600);
Serial.begin(9600);
}

void loop()
{
if(mySerial.available()>0)
{
Position = mySerial.read();
Position = map(Position, 0, 180, 180, 0);
myservo.write(Position);
}
}

Why not post the actual code that gives the errors? What you posted has NO errors when I compile it.

Steve

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.