First off, I'm sorry I'm so new. This is probably something so simple.
I've just learned about Serial.begin and I've added into my void setup when I'm simply making two LED's blink. They work fine but when I add the Serial.begin(9600); at the top of void setup it now makes my first LED stay on constantly while the other works as programmed.
int redLED=1; // Red LED set to 1
int yellowLED=3; // Yellow LED set to 3
int redOnTime=1000; // Red LED On Time
int redOffTime=1000; // Red LED Off Time
int yellowOnTime=1000; // Yellow LED On Time
int yellowOffTime=500; // Yellow LED Off Time
int numRedBlink=3; // number of times blink red
int numYellowBlink=3; //number of times blink yellow
for (int j=1; j<=numRedBlink; j=j+1 ) {
Serial.println(j);
digitalWrite(redLED, HIGH); // Turn red LED on
delay(redOnTime);
digitalWrite(redLED, LOW); // Turn red LED off
delay(redOffTime);
}
Serial.println(" ");
for (int j=1; j<=numYellowBlink; j=j+1){
digitalWrite(yellowLED, HIGH); // Turn yellow LED on
delay(yellowOnTime); // Wait
digitalWrite(yellowLED, LOW); // Turn yellow LED off
delay(yellowOffTime); // Wait
}
Please use code tags (</> button on the toolbar) when you post code or warning/error messages. The reason is that the forum software can interpret parts of your code as markup, leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier to read your code and to copy it to the IDE or editor. If your browser doesn't show the posting toolbar then you can just manually add the code tags:
[code]
[color=blue]// your code is here[/color]
[/code]
Using code tags and other important information is explained in the How to use this forum post. Please read it.
Please always do a Tools > Auto Format on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read. If you're using the Arduino Web Editor you will not have access to this useful tool. I recommend you to use the standard IDE instead.
Please remove unnecessary blank lines from your code before posting to the forum. One or two to separate code into logical sections is fine but large spaces for no reason just make for more scrolling when we're trying to read your code.