Hi all newbie here
I am trying to get the nano to flash a led from pin 13 the code compiles and run but flashes the internal led only. My code is simple but I have now become confused
int led1 = 13;
// put your setup code here, to run once
void setup() {
pinMode(led1 , OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(led1 , HIGH);
delay(2000);
digitalWrite(led1 , LOW);
delay(2000);
}
HI All
well the mystery deepens careful check orientating prob. ( dope slap) nothing, OK did my ageing eyes miss read the color code (dope slap) change and verify 330 ohms my Fluke DMM drives enough current to light the led when forward biased OK, result nothing. With DMM at pin 13 reference to pin 29 GND there is no state change at pin 13!
do I have a defective nano? I have ordered a uno. I am doing this because my Grandson got a Arduino and wants to learn how
You're not trying to derive pin numbers like you would on a DIP package or something, are you? Pin D13 is in the corner by the USB connector; they're numbered based on their functionality on the original larger boards, not based on either the chip pin number or the DIP pin number on the nano.
Use a diagram like: http://lab.dejaworks.com/wp-content/uploads/2016/08/Arduino-Nano-Pinout.png
You should use the pin marked 'd13' not the one marked 'd10' if, in your sketch, you have the statement:
digitalWrite(13);
That is what the white numbering is for !