Reading from serial port inside a method yields different results than from main

Printable View