First, I know that I don't speak English perfectly because English is not my navite language. I hope you'll understand me.
I have no programming knowledge, I'm trying to do my best with using example codes which I found from blogs. Please focus on the error, not accuracy of commands.
I want LCD to print "Hello World!" cliché when I press the button. This is the code that I use:
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup()
{
pinMode(7, INPUT);
}
void loop() ;
{
lcd.begin(16, 2);
if ((digitalRead(7, HIGH));
lcd.print("hello, world!" ; ))
}
Error: "expected unqualified-id before '{' token"
It's weird to use semicolon after void loop() (because I didn't use semicolon after void loop() command in my previous projects) but when I don't do this, I get these errors:
"lcd_potansiyometre.ino: In function 'void loop()':
lcd_potansiyometre.ino:18:27: error: too many arguments to function 'int digitalRead(uint8_t)'
In file included from lcd_potansiyometre.ino:4:0:
C:\Program Files\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:127:5: note: declared here
int digitalRead(uint8_t);
error: expected ')' before ';' token
error: expected ')' before ';' token
error: expected primary-expression before ')' token
error: expected ';' before ')' token"
Why semicolon after void loop() is required that much?
How can I solve "expected unqualified-id before '{' token" problem?