Hii!
I am trying to do code that when i input "parola" by serial monitor it will light up the built in led
but i get the error ''expected initializer before 'void''
What i can do?
The code:
int par;
int perete
void setup() {
// put your setup code here, to run once:
pinMode (LED_BUILTIN , OUTPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.readString(parola);
perete=buffer;
if (perete=parola)
digitalWrite(LED_BUILTIN, HIGH);
}
And the error
Arduino: 1.8.0 (Windows 7), Board: "Arduino/Genuino Zero (Programming Port)"
sketch_sep16a:8: error: expected initializer before 'void'
void loop() {
^
C:\Users\misu\AppData\Local\Temp\arduino_modified_sketch_139765\sketch_sep16a.ino: In function 'void loop()':
sketch_sep16a:10: error: 'parola' was not declared in this scope
Serial.readString(parola);
^
sketch_sep16a:11: error: 'perete' was not declared in this scope
perete=buffer;
^
sketch_sep16a:11: error: 'buffer' was not declared in this scope
perete=buffer;
^
exit status 1
expected initializer before 'void'
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Thanks for the time and maybe the help ![]()