Don't upload code.

Hi there. This is my code:

#include <LiquidCrystal.h>
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

const int redLedPin = 53;
const int redLedPin1 = 52;

void setup()
{
  lcd.begin(16, 2);
  
  pinMode(redLedPin, OUTPUT);
  digitalWrite(redLedPin, HIGH);
  
  pinMode(redLedPin1, OUTPUT);
  digitalWrite(redLedPin1, HIGH);
}

void loop()
{
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Hello");
  lcd.print(" Every");
  lcd.setCursor(1, 2);
  lcd.print("one");
}

And there is a error message:

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

What I am doing wrong?

Tell us what Arduino you have, what you have set for the board type, what com port you are using, and how you are uploading the sketch?

Arduino mega 2560
port 1
I upload via upload button

I suspect you're not using the correct com port.

Oh, but I tried two ports (1 and 7)

Unplug your arduino, see what ports are available. Then plug it in again and see which one appears.

KenF:
Unplug your arduino, see what ports are available. Then plug it in again and see which one appears.

Thx, it helped :slight_smile: