LCD Display arduino uno error ccode

Hi, I have this code for my arduino uno and my LCD display but it's showing me an error. Does anyone know what can it be??
I'm very new to this world, so I know i have something wrong with the Display code

Error: candidate expects 0 arguments, 1 provided
exit status 1
no matching function for call to 'LiquidCrystal_I2C::display(const char [18])'

#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd = LiquidCrystal_I2C(0x27, 16, 2);

volatile int BPM;
byte Heart[] = {

int pin = 7;
unsigned long duration;
int calculation=0;

void setup() {
lcd.print("MACHA ECG");
lcd.createChar(0, Heart);

pinMode(pin, INPUT);


void loop() {
lcd.setCursor(0, 1);
duration = pulseIn(pin, HIGH);

while (pulseIn= HIGH){
calculation= duration+1;
delay (30000);
calculation= duration+1;

    BPM= calculation *2; 

lcd.setCursor(3, 0);

if (BPM >=100){
lcd.display ("Sinus Tachycardia");

}else if (BPM <=60){
lcd.display ("Sinus Bradycardia");
}else {
lcd.display ("Normal Sinus");

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination

lcd.display ("Sinus Tachycardia");

Does this look like how the LCD library examples print to the screen ? Did you perhaps mean something like

lcd.print ("Sinus Tachycardia");

omg yes, i dont know why i used display. Thank you!

If i'm looking at the same I2C LCD library that you may be using, then the display() function is used to turn the display on along with noDisplay() to turn it off.

Use the print() function as suggested by @UKHeliBob, and please read the post(s) to better help yourself in the future.

@anshls, your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advise on) your project :wink: See About the Installation & Troubleshooting category.

Please edit your post, select all code and click the </> button to apply so-called code tags and next save your post. It makes it easier to read, easier to copy and prevents the forum software from incorrect interpretation of the code. Example of the latter is [] in the code that you posted vs [] (in your IDE).

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.