# Serial.begin(9600); interfering with 16x2 dispaly

**URL:** <https://forum.arduino.cc/t/serial-begin-9600-interfering-with-16x2-dispaly/390029>\
**Category:** Displays\
**Created:** [June 4, 2016, 12:29pm UTC](https://forum.arduino.cc/t/serial-begin-9600-interfering-with-16x2-dispaly/390029 "2016-06-04T12:29:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sir\_Morfield](https://avatars.discourse-cdn.com/v4/letter/s/aeb1de/32.png) [@Sir\_Morfield](https://forum.arduino.cc/u/Sir_Morfield)\
**Post date:** [June 4, 2016, 12:29pm UTC](https://forum.arduino.cc/t/serial-begin-9600-interfering-with-16x2-dispaly/390029/1 "2016-06-04T12:29:01Z")

</div>

So I have this problem, in my code i want to show the values on a lcd, and on the serial monitor.  
But when I add the "Serial.begin(9600);" The lcd starts to display weird tokens and sometimes does nothing.

.

So it is serial monitor OR lcd.  
But I want both.  
I tested the display with the code that i got from the Arduino Projects book, then the dispay works fine, (even with the other pins than in the original code)  
This is my example code:

```cpp
#include <LiquidCrystal.h>
LiquidCrystal lcd(0, 1, 5, 4, 3, 2);

int count = 1 ;

void setup() {
  Serial.begin(9600); //If I leave this line in, it can show it on on serial monitor, but not on the lcd.
                      //If I remove the line it will only show the numbers on the lcd, not on the serial monitor.
  
  lcd.begin(16, 2);
  lcd.clear() ;
  delay(2000) ;
}
  
  void loop() {

Serial.print(count++) ;
 Serial.println() ;

  lcd.home();
  lcd.print(count);
  
  lcd.setCursor(0, 1);
  lcd.print(count);
 
 delay(2000) ;

  }

```

---

<div class="post-metadata">

**Author:** ![david\_prentice](https://avatars.discourse-cdn.com/v4/letter/d/96bed5/32.png) [@david\_prentice](https://forum.arduino.cc/u/david_prentice)\
**Post date:** [June 4, 2016, 12:50pm UTC](https://forum.arduino.cc/t/serial-begin-9600-interfering-with-16x2-dispaly/390029/2 "2016-06-04T12:50:14Z")

</div>

Yes. 0, 1 are used by the Serial. You can't use for LCD at the same time.

---

<div class="post-metadata">

**Author:** ![chummer1010](https://avatars.discourse-cdn.com/v4/letter/c/e47774/32.png) [@chummer1010](https://forum.arduino.cc/u/chummer1010)\
**Post date:** [June 4, 2016, 12:56pm UTC](https://forum.arduino.cc/t/serial-begin-9600-interfering-with-16x2-dispaly/390029/3 "2016-06-04T12:56:35Z")

</div>

You will need to connect the two pins that are connected to 0 and 1 elsewhere, and modify the code accordingly.

---

<div class="post-metadata">

**Author:** ![Sir\_Morfield](https://avatars.discourse-cdn.com/v4/letter/s/aeb1de/32.png) [@Sir\_Morfield](https://forum.arduino.cc/u/Sir_Morfield)\
**Post date:** [June 4, 2016, 2:47pm UTC](https://forum.arduino.cc/t/serial-begin-9600-interfering-with-16x2-dispaly/390029/4 "2016-06-04T14:47:36Z")

</div>

Thank you guys so much, it worked!

---

<div class="post-metadata">

**Author:** ![bodmer](https://avatars.discourse-cdn.com/v4/letter/b/65b543/32.png) [@bodmer](https://forum.arduino.cc/u/bodmer)\
**Post date:** [June 4, 2016, 2:56pm UTC](https://forum.arduino.cc/t/serial-begin-9600-interfering-with-16x2-dispaly/390029/5 "2016-06-04T14:56:39Z")

</div>

Ah, duplicate post!

---

<div class="post-metadata">

**Author:** ![jualfoar](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@jualfoar](https://forum.arduino.cc/u/jualfoar)\
**Post date:** [February 26, 2018, 6:57pm UTC](https://forum.arduino.cc/t/serial-begin-9600-interfering-with-16x2-dispaly/390029/6 "2018-02-26T18:57:49Z")

</div>

Hi!  
Can you post the working code? and the circuit?

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 6, 2021, 3:44am UTC](https://forum.arduino.cc/t/serial-begin-9600-interfering-with-16x2-dispaly/390029/7 "2021-05-06T03:44:33Z")

</div>

Closed on May 6, 2021, 3:44am UTC


