servo help :/?

hi, i am very new to arduinos. i did once build a PWM speed controller using one for my lathe motor but had found a thread where someone was doing the exact same project so i was able to just copy the code and it worked luckily haha.
ive gone back to basics and am trying to control a servo and every time i compile the code its fine then i try to upload it and get the following error message...

Arduino: 1.8.12 (Windows 10), Board: "Arduino Uno"

Sketch uses 2064 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.
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM6 -b115200 -D -Uflash:w:C:\Users\Sophie\AppData\Local\Temp\arduino_build_352257/sketch_jan17a.ino.hex:i

avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

Using Port : COM6
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: ser_open(): can't open device "\.\COM6": Access is denied.

avrdude done. Thank you.

Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
Invalid library found in C:\Users\Sophie\Documents\Arduino\libraries\hardware: no headers files (.h) found in C:\Users\Sophie\Documents\Arduino\libraries\hardware
Invalid library found in C:\Users\Sophie\Documents\Arduino\libraries\hardware: no headers files (.h) found in C:\Users\Sophie\Documents\Arduino\libraries\hardware

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

this is the code i am running....

#include <Servo.h>

Servo myservo;

void setup() {
myservo.attach(9,600,2300);

}

void loop() {
myservo.write(0);
delay(1000);

myservo.write(90);
delay(500);

myservo.write(135);
delay(500);

myservo.write(180);
delay(500);

}

my IDE is 1.8.12

any advise would be greatly appreciated :slight_smile:

just tried out the example 'blink' sketch and had the following message.....

Arduino: 1.8.12 (Windows 10), Board: "Arduino Uno"

Sketch uses 924 bytes (2%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM6 -b115200 -D -Uflash:w:C:\Users\Sophie\AppData\Local\Temp\arduino_build_266667/Blink.ino.hex:i

avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

Using Port : COM6
Using Programmer : arduino
Overriding Baud Rate : 115200
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : Arduino
Description : Arduino
Hardware Version: 3
Firmware Version: 4.4
Vtarget : 0.3 V
Varef : 0.3 V
Oscillator : 28.800 kHz
SCK period : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "C:\Users\Sophie\AppData\Local\Temp\arduino_build_266667/Blink.ino.hex"
avrdude: writing flash (924 bytes):

Writing | ################################################## | 100% 0.18s

avrdude: 924 bytes of flash written
avrdude: verifying flash memory against C:\Users\Sophie\AppData\Local\Temp\arduino_build_266667/Blink.ino.hex:
avrdude: load data flash data from input file C:\Users\Sophie\AppData\Local\Temp\arduino_build_266667/Blink.ino.hex:
avrdude: input file C:\Users\Sophie\AppData\Local\Temp\arduino_build_266667/Blink.ino.hex contains 924 bytes
avrdude: reading on-chip flash data:

Reading | avrdude: stk500_recv(): programmer is not responding
######avrdude: stk500_recv(): programmer is not responding
avr_read(): error reading address 0x0000
read operation not supported for memory "flash"
avrdude: failed to read all of flash memory, rc=-2
avrdude: stk500_recv(): programmer is not responding

avrdude done. Thank you.

the selected serial port
does not exist or your board is not connected
Invalid library found in C:\Users\Sophie\Documents\Arduino\libraries\hardware: no headers files (.h) found in C:\Users\Sophie\Documents\Arduino\libraries\hardware
Invalid library found in C:\Users\Sophie\Documents\Arduino\libraries\hardware: no headers files (.h) found in C:\Users\Sophie\Documents\Arduino\libraries\hardware

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

the COM port most definitely exists and it is definitely connected does anyone have any suggestions?

@higgins420

Could you take a few moments to Learn How To Use The Forum.

Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.

very sorry about that just realized i posted in the wrong place :confused:

You are probably in a good place for now but you may want to learn HOW to post code and add schematics as they can be crucial.

Bob.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.