LCD display garbled when serial monitor initialized [solved]

I am new to this, and started playing with a starter pack that included an 16x2 LCD display (in the Make Ultimate Microcontroller Pack). Everything works fine with the display, and my 'Hello world' sketch and a digital thermometer sketch worked fine. Then I started playing with an ultrasonic range-finder, and that sketch used serial output. I decided to blend the two sketches together and output the measured distance to the LCD, but all I got was a line of constantly updating garbage. I reloaded the 'Hello world' sketch, thinking maybe I moved some wires, but it worked just fine. After playing around for a while I discovered that if I add 'serial.begin(9600)' to the 'Hello world' sketch I get the same garbage output. Removing the serial output from my range-finder sketch also fixed that sketch.

Is this something that is known, expected, and that I can read more about? Other sketches I have seen when searching for this seem to use both without reported problems.


Are you using pins 0 & 1 on the LCD? These pins are used for serial connections through the USB

Yes, I was using 0 and 1, and that was exactly it. I changed the pins and un-commented the lines of serial code and everything works.

Thank you very much for that bit of knowledge. I have not run in to that yet.