Intel® Makers
Intel® Edison, Intel® Joule™, Intel® Curie™, Intel® Galileo
Announcements
Welcome - This is a Peer-to-Peer Forum only. Intel has discontinued these products but you may find support from other customers on this Forum
9872 Discussions

How to run servo motor from putty

ARami7
New Contributor I
1,009 Views

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);

}

1 Solution
Diego_V_Intel
Employee
169 Views

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

View solution in original post

2 Replies
Diego_V_Intel
Employee
170 Views

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

FTinetti
Honored Contributor I
169 Views

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.

Reply