Hello,
I don’t understand why you start another topic for same thing instead of asking more specific questions.
I see nothing wrong except your comment what broke the syntax of braces {
Replace it with serial_port.getc();
Change to led = 1;
and led = 0;
BR, Jan