Go Down

Topic: no matching function for call to 'LiquidCrystal::blink(int)' (Read 190 times) previous topic - next topic

caps_67

#include <LiquidCrystal.h>


LiquidCrystal lcd(1, 2, 10, 11, 12, 13);

 void setup() {
  lcd.begin(16,2);
 }

void loop(){
  lcd.print("Arduino");
  delay(3000);

  lcd.setCursor(2,1);
  lcd.print("LCD Turtorial");
  delay(3000);

   lcd.clear();

   lcd.blink();
   lcd.blink(4000);
   lcd.setCursor(7,1);
   delay(3000);
   lcd.noBlink():

   lcd.cursor();
   delay(4000);
   lcd.noCursor();

   lcd.clear();
}




I'm having trouble with the libraries of the displays. What I'm trying to to is get a potentiometer to work with a LCD (16x2). What I want to do is turn on and off the LCD with the potentiometer. But it giving me an error called, no matching function for call to 'LiquidCrystal::blink(int)' and I did look up this exact question on google and still don't understand why I did cause this error.   

groundFungus


Code: [Select]
lcd.blink(4000);

The blink function() takes no arguments.  
You will save everyone's time if you read and follow the forum guidelines.  :)          
https://forum.arduino.cc/index.php/topic,148850.0.html
and
https://forum.arduino.cc/index.php?topic=97455.0

noiasca

Quote
What I want to do is turn on and off the LCD with the potentiometer
there is no "turn on and off the LCD".
blink will blink the cursor.

You can either clear() the display - no characters will be shown
or if you have connected the backlight to a gpio + transistor - you can turn on/off the backlight - but the characters on the LCD will still be there.


edit:
never thought, that there is really something like

Code: [Select]

// Turn the display on/off (quickly)
void LiquidCrystal::noDisplay() {
  _displaycontrol &= ~LCD_DISPLAYON;
  command(LCD_DISPLAYCONTROL | _displaycontrol);
}
void LiquidCrystal::display() {
  _displaycontrol |= LCD_DISPLAYON;
  command(LCD_DISPLAYCONTROL | _displaycontrol);
}
...
how to react on postings:
- post helped: provide your final sketch, say thank you & give karma.
- post not understood: Ask as long as you understand the post
- post is off topic (or you think it is): Stay to your topic. Ask again.
- else: Ask again.

groundFungus

There are the display() and noDisplay() functions that turn the display of characters on and off.
You will save everyone's time if you read and follow the forum guidelines.  :)          
https://forum.arduino.cc/index.php/topic,148850.0.html
and
https://forum.arduino.cc/index.php?topic=97455.0

bperrybap

There are the display() and noDisplay() functions that turn the display of characters on and off.
And in other lcd libraries like the hd44780 library, there is also off() and on() which not only turns the LCD pixels off/on, as is done with noDisplay() and display()  but if you have h/w backlight control using an Arduino pin, and configure the library to use it, the off()/on() will also turn off/on the backlight as well.

--- bill

Go Up