Hi Guys, I started working with the Arduino Micro for the first time and I'm having an issue. When I'm running a loop and feeding the loop state through the Serial Monitor, I disconnect the Serial Monitor and my micro speed drops to about 500ms intervals and I have to reset or reboot the micro to get the normal loop speed back, I'm not sure why I'm getting this behavior. Can someone give me an idea why this is happening? My code is listed below. I'm running a 16x1 LCD but it has no effect either way.
Thanks
Your help is appreciated.
Derrick
//#include "Wire.h"
#include "Adafruit_LiquidCrystal.h"
Adafruit_LiquidCrystal lcd(0x23);
byte X=0;//Global Variable//
void setup() {
Serial.begin(9600);
lcd.begin(16, 1);
lcd.clear();
lcd.home();
pinMode(13,OUTPUT);
lcd.print("------>");
}
void loop() {
Serial.println(X);
X=X+1;
lcd.setCursor(7, 0);
lcd.print(X);
lcd.print("<-------");
if(X==255)
{
lcd.clear();
lcd.print("------>");
X=0;
}
digitalWrite(13,HIGH);
//delay(25);
digitalWrite(13,LOW);
//delay(25);
}