Hello i successfully connected to my gen 2 board with serial connection, how do i activate servo motor using putty?
i have the C++ code:
# include
Servo myservo;
int potpin = 0;
int val;
void setup()
{
myservo.attach(12);
}
void loop()
{
val = analogRead(potpin);
val = map(val, 0, 1023, 0, 180);
myservo.write(val);
delay(15);
}
Link Copied
Hi AdanChristo,
That code seems to be an Arduino sketch. If so, you should upload the sketch to the board using the Arduino IDE and it will start running automatically. There is no need to access the terminal through PuTTY.
Regards,
Diego
Hi AdanChristo,
That code seems to be an Arduino sketch. If so, you should upload the sketch to the board using the Arduino IDE and it will start running automatically. There is no need to access the terminal through PuTTY.
Regards,
Diego
Hi AdanChristo,
Your sketch moves the servo according to the analog value read at analog pin 0.
What do you mean by
how do i activate servo motor using putty?
? Please give describe what you are trying to do.
Fernando.
For more complete information about compiler optimizations, see our Optimization Notice.