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