Go Down

Topic: Issues with moving a servo (Read 74 times) previous topic - next topic


I am trying to make a servo turn 180 degrees, and it compiles but there is an issue with uploading which I assume is attributed to the addition of the motor controller:

Arduino: 1.8.9 (Windows Store (Windows 10), Board: "Arduino/Genuino Uno"

Sketch uses 2152 bytes (6%) of program storage space. Maximum is 32256 bytes.
Global variables use 50 bytes (2%) of dynamic memory, leaving 1998 bytes for local variables. Maximum is 2048 bytes.
avrdude: ser_open(): can't set com-state for "\\.\COM3"
An error occurred while uploading the sketch

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Is this a noob error or what? I put on my motor controller and plugged the servo onto the correspoding pins, and it did a quick little turn but just for a second. I followed a little tutorial and from what I know I put the right wires into the right spot on the arduino without the motor controller, but I'm not sure. Here is my code:

#include <Servo.h>
int servoPin=3;
Servo Servo1;
void setup(){
void loop(){

Any help for a noob is welcome.


Code: [Select]
avrdude: ser_open(): can't set com-state for "\\.\COM3"Which port have you got selected in the Tools/Port menu in the IDE ?
Please do not send me PMs asking for help.  Post in the forum then everyone will benefit from seeing the questions and answers.


Is this the same motor shield you posted about causing this problem back in 2016?

Go Up