Help for a newb please

Hello!

First post, so try to be nice :stuck_out_tongue:

I got an Audrino Uno today, and have been playing about with it, been through some examples etc etc. However I am a bit stuck, and would be grateful if someone could help. I have a very simple circuit, which goes like this :

digital pin 1 -> 1kohm resistor
1kohm resistor -> LED
LED-> Ground pin on board

I simply want to have the LED "powered down", so, I wrot the following code and uploaded it :

int led = 1;

void setup() {                
  pinMode(led, OUTPUT);     
  digitalWrite(led, LOW);   
  Serial.begin(9600);
}

void loop() {     
            
}

But it does not work! If i take the Serial.begin out, then it does, but I will need this command as I will be logging data into the viewer once I get this sorted, can anyone tell me where I am going wrong?

Ryan

Look closely at the board.

Pins 0 and 1 are Tx and Rx for the serial channel. This serial channel cannot initialize properly and also have that pin be a digital output.

Move your led to pin 2 or 3 and change your code accordingly and see how you do.

I told you I was a newb! Thank you very much for the prompt reply :slight_smile: