I am just starting with Arduino and was trying to make the LED example work. I changed the script as follows to keep the LED on:
#define LED_PIN 12
#define LED_RX_SIG LED_BUILTIN
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_PIN, OUTPUT);
pinMode(LED_RX_SIG, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_PIN, HIGH); // turn the LED on (HIGH is the voltage level)
//delay(1500); // wait for a second
//digitalWrite(LED_PIN, LOW); // turn the LED off by making the voltage LOW
//delay(1500); // wait for a second
//digitalWrite(LED_RX_SIG, HIGH);
//delay(1000);
//digitalWrite(LED_RX_SIG, LOW);
//delay(1000);
}
I setup the Nano board, LED and a 220ohm resistor on a breadboard. The D12 port on Nano is connected to one end of the 220ohm resistor using a jumper cable. The other end of the resistor is connected to the positive (longer end) of the LED. The negative end of the LED is connected to the GND pin on Nano. The setup is shown in the image below:
What's wrong with the setup and why the LED is not lit? Sorry in advance for such novice question and any help will be greatly appreciated. Thanks