Hi, i've a problem with the serial port comunication, i use Arduino IDE on Ubuntu 15, when i try to send the first value for moving an servo motor the comunication work well but when i try to send the second value the IDE return an error of comunication and i'm forced to change the port... what can i do??
Thank and sorry for my English....
#include <Servo.h>
Servo servoMotor1;
int grad = 0;
//int gradMin=0;
//int gradMax=180;
int servoPin1 = 11;
void setup() {
servoMotor1.attach(servoPin1);
Serial.begin(9600);
}
void loop()
{
grad = Serial.read();
Serial.println("Gradi: " + grad);
servoMotor1.write( grad );
delay(15);
}