arduino code move servo when serial character is recieved via USB to PC

Write a code in arduino to move servo 40 degrees, wait 3 sec and return to 0 degrees.

I have a code now but servo keeps vibrating when return to 0 degrees.

Arduino UNO

GOTECK GS-5515MG Servo

6V external supply for servo

This is actual CODE:

// Include the Servo library

#include <Servo.h>

// Declare the Servo pin

int servoPin = 3;

// Create a servo object

Servo Servo1;

void setup() {

// We need to attach the servo to the used pin number

[url removed, login to view](servoPin);

[url removed, login to view](9600);

[url removed, login to view]("<Listo para recibir datos>");


char receivedChar;

boolean newData = false;

void loop() {




void recvOneChar() {

if ([url removed, login to view]() > 0) {

receivedChar = [url removed, login to view]();

newData = true;



void showNewData() {

if (newData == true) {

[url removed, login to view]("Esta en ... ");

[url removed, login to view](receivedChar);

// Make servo go to 50 degrees

// Mueve servo a 50 grados

[url removed, login to view](50);


[url removed, login to view](0);

newData = false;



Skills: Arduino

See more: heart monitor arduino code, wifly arduino code, arduino code reader, polar heart arduino code, mips code convert numeric character integer number, iphone internet usb pc, free download icr code read handwritten character vb net, convert arduino code, code role playing character builder, code bluetooth serial port blackberry recvie data, construct java code creating game character, code number times character shows, perl program serial port communication usb, assembly code define array character sort, passer code crypto serial dans exe, code assembly serial communication 8088

About the Employer:
( 4 reviews ) atizapan, Mexico

Project ID: #14948544

52 freelancers are bidding on average $76 for this job


Hola! mi nombre es Manuel soy Ingeniero Mecatronico y Programador con experiencia desarrollando proyectos con Arduino, ESP8266, PIC, Raspberry. Puedes revisar mi perfil y ver mis trabajos realizados. Con respecto a tu More

$35 USD in 1 day
(37 Reviews)

Hi, I have experience in Arduino systems developing. I can help you. Best regards. Relevant Skills and Experience Arduino Servo motor Proposed Milestones $55 USD - Miestone

$55 USD in 3 days
(16 Reviews)

Hola, puedo ayudarte con tu proyecto en la plataforma Arduino, me podrias comentar un poco mas sobre el mismo. Relevant Skills and Experience Si estamos ante un proyecto sencillo el costo sera bajo. Proposed Mileston More

$30 USD in 3 days
(52 Reviews)

Hello. I can help you quickly. Please contact me in chat Relevant Skills and Experience I work with Arduino since 2010 and have large experience Proposed Milestones $30 USD - Debug the code for Arduino

$30 USD in 0 days
(39 Reviews)

hi i am an electrical engineer. i have vast experience related to circuit design and micro controller programming. Relevant Skills and Experience i have done many embedded system projects. i have hardware experience m More

$150 USD in 15 days
(5 Reviews)

control servo motor via usb serial in Relevant Skills and Experience We can quickly help you with this. Proposed Milestones $30 USD - Arduino Code

$30 USD in 2 days
(19 Reviews)

A proposal has not yet been provided

$55 USD in 3 days
(6 Reviews)

Hi, I'm interested in working on this project. Please, consider sending a message so that we can discuss the project details exclusively. Thank you Stay tuned, I'm still working on this proposal.

$55 USD in 3 days
(26 Reviews)

A proposal has not yet been provided

$99 USD in 3 days
(9 Reviews)

A proposal has not yet been provided

$40 USD in 3 days
(11 Reviews)

Hello, Greetings! With a proven track record of successful achievements, I am pleased to present my application for your consideration as a Freelancer. Relevant Skills and Experience Please have a look at my profile a More

$55 USD in 3 days
(6 Reviews)

Dear Sir, My number one priority is customer service and satisfaction! I can complete your project with in time and in an efficient manner following the best industry standards. Relevant Skills and Experience Progra More

$155 USD in 3 days
(6 Reviews)
$50 USD in 3 days
(4 Reviews)

. Relevant Skills and Experience . Proposed Milestones $30 USD - Arduino .

$30 USD in 3 days
(3 Reviews)

HI, I'm Ushan. I can help you to solve the issue.. feel free to contact me.I have sound knowledge in arduino and severs. Relevant Skills and Experience SERVO driving Arduino Proposed Milestones $155 USD - Cod More

$45 USD in 3 days
(3 Reviews)

A proposal has not yet been provided

$60 USD in 7 days
(2 Reviews)

Hello. I modified your code this way: now it does not use delays, it uses timer instead. Also I added some logic to servo: now it does not change the angle instantly. You can change the parameter SERVO_STEP_TIME_MS to More

$30 USD in 0 days
(3 Reviews)

Hi, I am an Embedded System designer. I have been working on arduino for past 1+ year now. Do not award project before any discussion. Relevant Skills and Experience programming in C, C++, Arduino IDE, etc Proposed M More

$30 USD in 1 day
(1 Review)

A proposal has not yet been provided

$275 USD in 4 days
(1 Review)

I can help you with running the servo smoothly Relevant Skills and Experience Here is an example video: [login to view URL] Proposed Milestones $30 USD More

$30 USD in 2 days
(1 Review)