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[] = {
B00000,
B01010,
B11111,
B11111,
B01110,
B00100,
B00000,
B00000
};
int pin = 7;
unsigned long duration;
int calculation=0;
void setup() {
lcd.init();
lcd.backlight();
lcd.print("MACHA ECG");
lcd.createChar(0, Heart);
pinMode(pin, INPUT);
}
void loop() {
lcd.display();
lcd.setCursor(0, 1);
lcd.write(0);
delay(500);
duration = pulseIn(pin, HIGH);
while (pulseIn= HIGH){
calculation= duration+1;
delay (30000);
calculation= duration+1;
}
BPM= calculation *2;
lcd.display();
lcd.setCursor(3, 0);
lcd.write(1);
if (BPM >=100){
lcd.display ("Sinus Tachycardia");
}else if (BPM <=60){
lcd.display ("Sinus Bradycardia");
}else {
lcd.display ("Normal Sinus");
}