hmm yea that makes sense, its really a pain how they interfere with each other. I've heard that its possible to program the arduino via smirf, but it seems quite a bit of trouble for my purposes.
Just so I'm completely in the clear in my sketch, here it is, nothing sticks out like a sore thumb i hope?
#include <Servo.h>
const int servoPin = 9; // control pin for servo motor
Servo myservo;
int angle = 86;
void setup()
{
myservo.attach(servoPin);
myservo.write(angle);
Serial.begin(9600);
//com port 12 and 13 are supposedly the serial ports to my bluetooth, or at least my bluetooth software tells me. I
// Serial.println("AT+BTCLT=0011E00*****,12");
Serial.println("AT+BTSRV=12");
}
void loop()
{
if (Serial.available() > 0) {
int moveServo = Serial.read();
//1-0,2-30,3-60,4-90,5-120,6-150,7-180
if (moveServo == '1') {
angle =0;
}
if (moveServo == '2') {
angle =30;
}
.... more of the same
if (moveServo == '7') {
angle =180;
}
angle = constrain (angle, 0, 180);
myservo.write(angle);
}
}
I decided to go with AT+BTSRV since it turns on discovery and allows me to pair, where AT+BTCLT just goes for a connection. I assume that since the smirf is server that my computer's bluetooth would/can be configured for auto-reconnect?
When the arduino is on and disconnected from the usb, I will pair with it and connect from my computer. If I do this, port 12 hopefully would be connected and I would be able to send chars through hyperterminal to the arduino. Does it seem like this would be fine? I fear of hidden settings that would make this not work, nothing ever works out smoothly as planned :/
Thank you for the help
tianshiz