Led on Digital 9 not working

Hi

I just built my Arduino shield using pieces I bought from the official shop. I bought the emonTX Shield, the 9V adapter, 2x 100A current sensors.

I attached the shield to Arduino and tried to make the digital pin 9 led blink. But it's not working: here's the code.

/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.

  This example code is in the public domain.
*/

// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 9;

 

// the setup routine runs once when you press reset:
void setup() {               
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);    
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}

I tried using a multimeter to check if the digital input is generated correctly and its OK, because every second I receive a signal on my multimeter.

I also tried to power the LED manually and it's working... however it's not working using the shield... How can it be possible?

Here is an image:

[Attached]

Thank you.

Robert Wall's picture

Re: Led on Digital 9 not working

It is hard to see from the photo, is the LED oriented correctly, that is, with the shield disconnected from the Arduino, +5 V on the Dig9 pin and 0 V to GND lights the LED?

Where are you measuring with your multimeter? You should see > 4.2 V on Dig 9, ~ 2.1 V across the LED, and ~ 2.1 V across R10.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.