I'm new to this kind of thing. My code works on my Uno nowithout problem with two separate servos. I've I've ensured that it's not any faulty leads, having tried a few other circuits with LEDs, buttons and potentiometers as well, simply switching between my Uno (which works fine) and the Nano. I've
I've chosen the correct port, chipset and board each time and the code uploads fine to the Nano. The Nano simply refuses to do anything I tell it.
Digital PIN of servo goes to designated D5 pin.
Ground goes to the GND near the Analog pins (shouldn't matter which I imagine).
Power goes to 5V.
The code above simply tells the servo to go to a certain degree when uploaded. Could anybody tell me why the servo will not move at all with the Nano? I just bought it and I haven't hooked up any power to it other than the USB, surely it isn't fried. It lights up and flashes as well.
#include <Servo.h>
Servo my_servo;
void setup() {
my_servo.attach (5);
// Pin define
definition
}
void loop() {
my_servo.write (60);
// No. of degrees
}