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
int bluetoothTx = 0; //tx to pin 10
int bluetoothRx = 1; //rx to pin 11
SoftwareSerial bluetooth(bluetoothTx, bluetoothRx);
myservo.attach(10); //servo signal wire to pin 9
//setup usb connection to computer
//bluettoth serial conncetion to android
//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
Please READ THIS POST to help you get the best out of the forum.
These steps may also save you some unnecessary time and effort in the forum.
Check you have a COMMON GROUND where required.
Where possible use USB 2.0 ports or a USB 2.0 POWERED HUB to rule out USB 3.0 issues.
Try other computers where possible.
Try other USB leads where possible.
You may not have the correct driver installed. CH340/341 or CP2102
There may be a problem with the board check your wiring first.
Remove any items connected to pins 0 and 1.
Ensure you turn off any additional security / antivirus just to test.
There may be a problem with the PC try RESTARTING it.
You may be selecting the wrong COM port.
Avoid cloud/network based installations where possible OR ensure your Network/Cloud software is RUNNING.
Clear your browsers CACHE.
Close the IDE before using any other serial programs.
Preferably install IDE’s as ADMINISTRATOR or your OS equivalent
Performing the above actions may help resolve your problem without further help.
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.
Thanks in advance for your cooperation.