Basic Blink Not working without println

Hello!
I am new to Arduino programming and I am struggling with the basic blink program. If I upload the following code and open my serial monitor, it works fine.

void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
delay(2000);
Serial.println("In Setup");
 pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
 digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  Serial.println("On");
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
  Serial.println("Off");
}

Then if I comment out the Serial.println statements in the Loop function, nothing happens. What am I doing wrong? I comment the lines out by putting "//" in front of the line.

Any help would be appreciated.

Thanks,
Jim

Good on you for posting your code correctly. Now post the code with the lines commented out.

Paul

Sorry about that.

void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
delay(2000);
Serial.println("In Setup");
 pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
 digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  //Serial.println("On");
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
  //Serial.println("Off");
}

Also, I am using an Arduino Pro Micro that I ordered from Ebay. I went to the Sparkfun website and intalled the necessary files so I could use that board in the IDE.

Thanks!

Jim

The flashing works on my 2560. ¯_(ツ)_/¯

Are you sure you've got things connected properly?

Not sure at all. I ha e the board connected to my computer via USB. Could the board be something different. I know what I orded from Ebay and I'm guessing it is a clone.

I bought a ARDUINO PRO MICRO ATMEGA32U4 5V 16MHZ REPLACE ATMEGA328 PRO MINI LEONARDO USB. I installed and I am using the Sparkfun Pro Micro under the board manager.

Thanks,

Jim

Also, I am using an Arduino Pro Micro that I ordered from Ebay. I went to the Sparkfun website and intalled the necessary files so I could use that board in the IDE.

Thanks!

Jim

Can you give a link to the specific board that you have? There is a huge variety available on ebay.

Are you sure the on-board LED is actually working? Its possible the LED you are seeing blink is the activity LED for the serial interface. If the board is a generic knock-off, its also possible the on-board LED is connected to a different pin than standard.

edit:

If its the Sparkfun Pro Micro, or a clone of it, then the standard blink code will not work.
A direct quote from Sparkfun's website:

The Arduino-standard Blink sketch won’t have any visible effect on the Pro Micro – there’s no LED on pin 13. In fact, the only LEDs on the board are the power indicator, and RX/TX blinkies.

Thank you very much for the information, I appreciate it.

Here is a link for the board that I purchased. https://www.ebay.com/itm/Arduino-Pro-Micro-ATmega32U4-5V-16MHz-Replace-ATmega328-Pro-Mini-Leonardo-USB/262875377061?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649

My ultimate goal is to create a simple keyboard encoder with some LED control for an arcade control panel. My next step, once I get past this, is to add a button and see if I can capture a press.

Thanks again!

Jim

My guess is that it's a clone of the sparkfun pro micro - what happens if you connect an LED+resistor between pin 13 and ground? (be sure to get the polarity right, otherwise the LED won't light).

DrAzzy:
My guess is that it's a clone of the sparkfun pro micro - what happens if you connect an LED+resistor between pin 13 and ground? (be sure to get the polarity right, otherwise the LED won't light).

The schematic for the Sparkfun board shows D13 as unused, and it isn't brought out to any of the connectors.
The resistor and LED would work, just choose any available output and replace LED_BUILTIN in the code with the appropriate pin number.