Mình lập trình bị lỗi này
bài lập trình:
#include <LiquidCrystal_I2C.h>
#include <Wire.h>
LiquidCrystal_I2C lcd(0x27,16,2);
void setup() {
lcd.begin(16, 2);
}
void loop() {
lcd.setCursor(0, 0);
for (int thisChar = 0, thisChar > 10, thisChar++);
lcd.print(thisChar)
delay(500);
lcd.setCursor(16,1);
lcd.autoscroll();
for (int thisChar = 0, thisChar 10, thisChar++);
lcd.print(thisChar)
delay(500);
lcd.noAutoscroll();
lcd.clear();
}
mã lỗi:
Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Bo mạch:"Arduino/Genuino Uno"
C:\Users\Thuy Linh\Documents\Arduino\sketch_dec07c\sketch_dec07c.ino: In function 'void loop()':
sketch_dec07c:12:33: error: expected ';' before '>' token
for (int thisChar = 0, thisChar > 10, thisChar++);
^
sketch_dec07c:12:33: error: expected primary-expression before '>' token
sketch_dec07c:12:49: error: expected ';' before ')' token
for (int thisChar = 0, thisChar > 10, thisChar++);
^
sketch_dec07c:13:11: error: 'thisChar' was not declared in this scope
lcd.print(thisChar)
^
sketch_dec07c:17:33: error: expected ';' before '>' token
for (int thisChar = 0, thisChar > 10, thisChar++);
^
sketch_dec07c:17:33: error: expected primary-expression before '>' token
sketch_dec07c:17:49: error: expected ';' before ')' token
for (int thisChar = 0, thisChar > 10, thisChar++);
^
exit status 1
expected ';' before '>' token
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Mong mn giúp