programming for LCD Module 1602, I see this error.
programming lcd module 1602, see error.
# include <wire.h>
# include <liquidcrystal_i2c.h>
liquidcrystal_i2c lcd (0x27, 16,2); // set lcd address 0x27 16 chars , 2
line display
void setup ()
{
lcd.init (); / / initialize lcd
/ / print message lcd.
lcd.backlight ();
lcd.print ("blablabla");
}
void loop ()
{
}
error: ??why??
sketch_jul28a:5: error: 'line' not name type
sketch_jul28a:4: error: 'liquidcrystal_i2c' not name type
sketch_jul28a:6: error: 'line' not name type
thanks answer
# include <wire.h>
# include <liquidcrystal_i2c.h>
liquidcrystal_i2c lcd (0x27, 16,2); // set lcd address 0x27 16 chars , 2
line display
void setup ()
{
lcd.init (); / / initialize lcd
/ / print message lcd.
lcd.backlight ();
lcd.print ("blablabla");
}
void loop ()
{
}
error: ??why??
sketch_jul28a:5: error: 'line' not name type
sketch_jul28a:4: error: 'liquidcrystal_i2c' not name type
sketch_jul28a:6: error: 'line' not name type
thanks answer
first, c preprocessor isn't going having space between '#' , keyword include. should #include no spaces. second, you've put in spaces between function name , opening parentheses, in lcd (0x27, 16,2). did other function calls, (e.g., setup () and loop ()). rid of spaces. added space between method name , opening parentheses, in lcd calls (e.g., lcd.init ()). rid of space in front of opening parentheses. finally, have space between comment characters: //. rid of them.
now try , compile it.
now try , compile it.
Arduino Forum > Using Arduino > Programming Questions > programming for LCD Module 1602, I see this error.
arduino
Comments
Post a Comment