'Serial1' was not declared in this scope

if(Serial1.available()){

^

exit status 1
'Serial1' was not declared in this scope

please help me :frowning: :frowning: :frowning:

What board?

Because your code is geared towards Arduino Mega (with Serial, Serial1, Serial2, Serial3) but you have Uno, Micro, Nano.....selected as your board. And these only have Serial but not Serial1, Serial2, Serial3.

'Serial1' was not declared in this scope

Probably because you are using a board which does not have a serial1, which is why we need to know:

What board?

Alternatively, perhaps you are using a board with a serial1 but have selected the wrong board under the tools menu.

boylesg:
Because your code is geared towards Arduino Mega (with Serial, Serial1, Serial2, Serial3) but you have Uno, Micro, Nano.....selected as your board. And these only have Serial but not Serial1, Serial2, Serial3.

Micro has Serial1.

Not only that, but someone fixed the table:

micro_serial1_pins_fixed.GIF

micro_serial1_pins_fixed.GIF