Sketch uses 4450 bytes (13%) of program storage space. Maximum is 32256 bytes.
Global variables use 346 bytes (16%) of dynamic memory, leaving 1702 bytes for local variables. Maximum is 2048 bytes.
An error occurred while uploading the sketch
#include <SoftwareSerial.h>
#include <Servo.h>
Servo myservo;
int bluetoothTx = 0; //tx to pin 10
int bluetoothRx = 1; //rx to pin 11
void setup()
{
myservo.attach(10); //servo signal wire to pin 9
//setup usb connection to computer
Serial.begin(9600);
//bluettoth serial conncetion to android
bluetooth.begin(9600);
}
void loop()
{
//Read from bluetooth and write to usb serial
if(bluetooth.available()> 0 ) // recieve numnber from bluetooth
{
int servopos = bluetooth.read(); // save the recieved number to servopos
Serial.println(servopos); // serial print servopos current number recieved from bluetooth
myservo.write(servopos); // rotate the servo by angle recieved from the app
}
I've deleted your other cross post/hijack @sbherani.
Cross posting is against the rules of the forum. The reason is that duplicate posts can waste the time of the people trying to help. Someone might spend 15 minutes writing a detailed answer on this thread, without knowing that someone else already did the same in the other thread.
Repeated cross posting will result in a suspension from the forum.
In the future, please take some time to pick the forum section that best suits the topic of your question and then only post once to that forum section. This is basic forum etiquette, as explained in the sticky "How to use this forum - please read." post you will find at the top of every forum section. It contains a lot of other useful information. Please read it.