Have you tested the code on #6 with no resistors?
works ok in simulator, apart from initial sync issue due to the comms line not beginning at a proper tty level before reception enabled

and then again i used complete programs not snippets full of guess work


@Ioannis you missed the spam in faq section